skip to Main Content

I am working for someone who runs a webshop. Now the webshop runs on Opencart software, and fortunately they support SEO Url rewriting. I have been trying to get this working for the last 2 hours and havent been able to get it right. I have done the following to the .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:

Options +FollowSymlinks

# Prevent Directoy listing 
Options -Indexes

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

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/ 

RewriteBase /opencart/
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [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]

Additionally i have enabled SEO rewriting on opencart and given all products/categories etc. a SEO name.

Now the .htaccess file is located in: public_html/opencart/ so i have changed the RewriteBase from / to /opencart/

Still i get the following errors:

Not Found

The requested URL /aquaria/adm-aquaria was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Does anyone have a solution for me?

To give you an example i want the following link: to look like this:



  1. Chosen as BEST ANSWER

    Ok, wow i just found out i have been stupid the whole time. I had 2 .htaccess files. One which was the original without the right rewrite rules and 1 in my /opencart/ folder which had the right rewrite rules. What i did now is put the right rewrite rules into the .htaccess file in my root folder and it fixed the problem!! :D

  2. You don’t have to put this
    RewriteBase /opencart/

    If your url are like this…. Then
    you will have to put RewriteBase /opencart/
    end if; 🙂

    with your url you don’t have to put RewriteBase /opencart/
    only /


    Login or Signup to reply.
  3. You put your site in sub directory so you have to make following changes

    RewriteBase /opencart/ change to RewriteBase /


    RewriteRule ^([^?]*) index.php?route=$1 [L,QSA] change to
    RewriteRule ^([^?]*) /opencart/index.php?route=$1 [L,QSA]

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top