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>
Please follow and like us:

Add a Comment

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

error: Content is protected !!