Htaccess redirect URL to Alias

user3571545

I have the following rewrite Rule: RewriteRule abc\.html$ index.php?page=1 [L]

If a user attempts to open index.php?page=1 i would like to redirect him with a 301 to abc.html. I've tried the following: RewriteRule index\.php\?page=1$ abc.html [R=301,L]

It doesn't work. Is there a solution to do this?

Jon Lin

Try:

RewriteCond %{THE_REQUEST} \ /+index\.php\?page=1(&|\ |$)
RewriteRule ^ /abc.html [L,R=301]

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related