Updated on Dec 10, 2015
By default OpenCart does not generate Search Engine Friendly URLs for your store. In this tutorial we will show you how to enable SEF URLs for your OpenCart website.
mod_rewrite and OpenCart SEO URLs are fully supported on all FastComet OpenCart Hosting plans. If you experience any difficulties in activating this feature for your store, please contact our technical support for assistance.
This can be easily activated via your OpenCart Admin dashboard by referring to the System → Settings menu via the main navigation and click on Edit link next to your store name.
On the new page, please click on the Server tab from the sub navigation.
On the Server settings tab you will need to find the Use SEO URLs option and set the radio button to Yes. Save your settings via the Save button on the top right corner of your screen.
Be advised that after activating the SEO URLs for your OpenCart store you will need to perform one additional final step to complete the activation. Access your hosting account via your favorite FTP client or using your cPanel → FileManager and navigate to your OpenCart installation directory. If you have installed your application under the root of your domain name (ex: http://example.com) usually this is your public_html directory.
In the OpenCart installation directory you should locate a file called .htaccess.txt. Please rename the file from
.htaccess.txt to: .htaccess (note the 'dot' prefix of the filename)
In case you cannot locate the .htaccess.txt file under your account, please create a new .htaccess file on your local computer with the following content and upload it under your OpenCart directory:
RewriteBase / RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] RewriteRule ^download/(.*) /index.php?route=error/not_found [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
In case your OpenCart is installed under a subdirectory, please change the following line in the code above:
RewriteBase / - > RewriteBase /your-folder/
Save your file and make sure it is properly uploaded under your OpenCart directory. Now you should have your Search Engine Friendly URLs activated.