How to remove /home from url in .htaccess

You can try this code in root .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine on

//# Redirect from http://domain.com/home/... to http://domain.com/...
RewriteRule ^home\/(.*)$ /$1 [L,R=301]
RewriteRule ^home\/?$ / [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
</IfModule>

 

Leave a Reply