PHP FIX IssuesCategory: OpenCartseo url not working in opencart using htaccess
phpfix asked 46 years ago

I tried to add seo url and done asked settings for seo but i get 404 error please help

1 Answers
phpfix answered 8 years ago

Simple solution do like this
 
Step 1: Enable SEO URLs in OpenCart
Go to System » Server » Use SEO URL’s
Step 2: Rename your .htaccess.txt file to .htaccess by removing the .txt file extension
Step 3: Fill in the SEO Keyword for all the Categories and Products.
Go to Catalog » Products » Data » Seo Keyword. Do take note of the following:

  1. SEO Keyword is unique, and no duplicates are allowed.
  2. There should be no spaces in your SEO Keyword. You should use an underscore or hyphen between each word.

That’s it! Refresh your OpenCart shopping cart website, and you should you the SEO urls working properly.
Update: If OpenCart is installed in a subfolder, e.g. http://www.yourdomain.com/opencart/, you’ll need to modify the .htaccess file located in your OpenCart folder.
Edit the .htaccess file, and look for the following code section, starting from line 18:

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

You’ll need to edit line 20, which is:

RewriteBase /

to

RewriteBase /opencart/

After editing, your code should look like this:

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

Done!

Author - comments - 0

Copyright © 2014 - Designed by Jolly Themes