Opencart SEO homepage (remove index.php?route=common/home)

If you are using SEO urls on your opencart site (which you should be), you may notice that sometimes when you navigate to the homepage by clicking on your site logo or other link, the url appears with the index.php?route=common/home suffix.


The easiest way to remove this, is to edit your .htaccess file with the following code:

 RewriteCond %{QUERY_STRING} ^route=common/home$
 RewriteCond %{REQUEST_METHOD} !^POST$
 RewriteRule ^index\.php$ http://%{HTTP_HOST}? [R=301,L]
1 reply
  1. Dario
    Dario says:

    Ty for the code, I changed the last line to RewriteRule ^index\.php$ https://%{HTTP_HOST}? [R=301,L] that way my font awesome icons won’t stop working with the redirect.


Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.