Make url redirect in opencart at localhost
Make url redirect in opencart at localhost

As opencart uses the SEO URL, but I found most of the programmers are not using it in localhost, so today I am showing how to enable URL redirect in OpenCart in localhost. To use SEO URL’s, apache module mod-rewrite must be installed and you need to rename the htaccess.txt to .htaccess.

Enabling .htaccess in xampp

Open the httpd.conf file with your favourite text editor. In XAMPP, this file is found in the apacheconf directory (or /lampp/etc in linux)

Locate the following line of code:

#LoadModule rewrite_module modules/mod_rewrite.so

Remove the # from the line as seen below to enable the module:

LoadModule rewrite_module modules/mod_rewrite.so

Save the httpd.conf file

Restart your Apache Server

Now in the opencart admin activate SEO URL from

Admin>>System >> Setting >> Edit your store >>  then at Server tab << Enabled the SEO URL.

After that rename the .htaccess.txt to .htaccess

Now if your SEO URL does not work then find RewriteBase / / in .htaccess file and add folder name between slashes.

For eg: if your folder name inside the htdocs is YOURSTORENAME then it will be

RewriteBase / YOURSTORENAME /

Make url redirect in opencart at localhost
Make URL redirect in opencart at localhost

Then save and you will be able to work with the SEO URLs in localhost

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here