Reputation: 720
I am trying to forward /index.php?route=common/home to the domain name itself. I have tried the code below which works but it breaks the login page. I think the issue is that they used the same url for /admin/index.php?route=common/home and it will not allow me to login to the admin center. I have been unable to figure out how to fix the below redirect to restrict from the admin folder.
Any help on this matter is greatly appreciated.
# Redirect index to domain
RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteRule ^index\.php$ http://www.mysite.com? [R=301,L]
Upvotes: 2
Views: 3091
Reputation: 784998
Try to replace your rule with this:
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\.php\?route=common/home[?\s] [NC]
RewriteRule ^ /? [R=301,L]
Upvotes: 2