How to remove /home after baseUrl ?


I want to redirect www.baseurl.com/home to www.baseurl.com (301)

2 Answers 2


You can do it using htaccess file . In htacess file find:

Options +FollowSymLinks RewriteEngine on

Then Put the below code in htaccess file

RewriteCond %{THE_REQUEST} ^.*/home RewriteRule ^(.*)home$ http://www.domain.com/$1 [R=301,L]

or you can do this by

Go to System->Configuration->Web->Url Options and set the field Auto-redirect to Base URL to No.

Please check following links for more reference Product Page without www redirect to home instead of itself


  • 1
    This solution will work perfectly, but when we programmatically get the base url it will not work. Commented Nov 27, 2018 at 8:33

First update both the web/unsecure/base_url and web/secure/base_url URLs in core_config_data table to http://www.baseurl.com/ in your database.

Then clear the cache and remove generated/ folder

Ensure you have updated your virtual host settings according to the new URL.

Once you set the applied the virtual host changes, restart the apache server

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.