redirection opencart non www
CMS

Redirect my website from non-www to the www version in Opencart

In this article we are showing how to redirect non-www opencart website to www version. We have to add just a piece of code to htaccess file. Dont follow to implement step 2 to avoid admin login error and broken cart button error.

Step 1:

# SEO URL Settings

RewriteEngine On

RewriteCond %{HTTP_HOST} ^example.com [NC]

RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]

 

 

Step2:

update config.php file which i did and everything went perfect.

eg: http://example.com to http://www.example.com

Leave a Reply

Your email address will not be published. Required fields are marked *