Reputation: 353
I am trying to setup seo url in opencart on my local machine.
I have enabled seo url from admin system setting and set it to "YES"
After that, added following lines in my .htaccess
file-:
# 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
Order deny,allow
Deny from all
# SEO URL Settings
RewriteEngine On
RewriteBase /primebrand
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]
After this, I had set the seo keyword of my product and category. And restarted the Apache.
But it shows
403 forbidden
You don't have permission to access /primebrand/ on this server
Upvotes: 0
Views: 4161
Reputation: 1
I had the same problem but I have copied files of an old version of zopimlivechat. I have update files though message was appearing same after update version installation. Site is working fine again .
Upvotes: 0
Reputation: 2822
Problem is possibly your line "RewriteBase /primebrand". It requires a trailing "/", i.e. "RewriteBase /primebrand/"
Upvotes: 0
Reputation: 16055
If You had set
RewriteBase /primebrand
You are telling the Apache that all the rewrites should start in /primebrand/
directory - that will mean that You actualy have Your OpenCart installed in <HTTP_ROOT>/primebrand/
directory. In other words, lets say You have a local root http://localhost/mysite/
and the OpenCart is installed in localhost/mysite/primebrand
.
If this is not the case (so Your OpenCart is directly the site http://localhost/mysite/
), set the RewriteBase
back to /
, ending up with
RewriteBase /
This should be enough.
Upvotes: 2