Page 1 of 1

Help with .htaccess + seo url's

Posted: Tue Jul 05, 2011 2:35 am
by littleme
Hello everyone,

I've read all posts regarding seo urls but still I can't make it work. I have the following version: 1.4.9.3
and I have followed these steps:
1. set "seo urls" under server settings
2. changed from htaccess.txt to . htaccess
3. added seo keyword to product to test
4. urls appears but gives me 404 pages....

htaccess looks like:

# 1.To use URL Alias you need to be running apache with mod_rewrite enabled.

# 2. In your opencart directory rename htaccess.txt to .htaccess

# For any support issues please visit: http://www.opencart.com

Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini)">
Order deny,allow
Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]


### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling, then restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off


pleeease help me

im a woman in need :)

Re: Help with .htaccess + seo url's

Posted: Tue Jul 05, 2011 4:27 am
by rph
Is your shop in a subfolder by chance? If so you need to update RewriteBase to include it. So

Code: Select all

mystore.com/shop
would have

Code: Select all

RewriteBase /shop

Re: Help with .htaccess + seo url's

Posted: Tue Jul 05, 2011 5:59 am
by littleme
Hi,
thanks for the reply. no, the shop is on the index page (no sub folder).
As soon as I set the .htaccess the entire site crashes. Should that file include all that text written above?
And should it be in the root folder?

Re: Help with .htaccess + seo url's

Posted: Tue Jul 05, 2011 1:47 pm
by rph
littleme wrote:As soon as I set the .htaccess the entire site crashes.
No pages load at all? Not even non-SEO?
Should that file include all that text written above?
And should it be in the root folder?
Yes to both.

Re: Help with .htaccess + seo url's

Posted: Tue Jul 05, 2011 4:49 pm
by SXGuy
you said you gave the product a seo url, did you give the category its in, a seo keyword also? i didnt see you mention that step.

Re: Help with .htaccess + seo url's

Posted: Sat Jul 16, 2011 5:29 am
by evanmorgan
I was having the same problem, I read somewhere about 'commenting out' some lines in the .htaccess but couldn't find anywhere which ones these might be.

Well I dont know whether this affects other things on the site but I commented out the lines
#Options -Indexes
#Options +FollowSymlinks
with a preceeding # and it works.

Hopefully someone with more technical experience could explain whether this is a bad idea.

Good luck

Evan

Re: Help with .htaccess + seo url's

Posted: Sat Jul 16, 2011 5:00 pm
by hbg
I am no expert, but I have used an extension called SEO generator, which is free. I t has helped me out often.

Re: Help with .htaccess + seo url's

Posted: Thu Feb 16, 2012 6:42 pm
by arvind7421
rph wrote:Is your shop in a subfolder by chance? If so you need to update RewriteBase to include it. So

Code: Select all

mystore.com/shop
would have

Code: Select all

RewriteBase /shop

Thanks for this.....my site now working fine with seo via htaccess...

regards
arvind