htaccess redirect url to page
I want to redirect a particular page using a 301 but my htaccess is also redirecting pages that contain the same start.
Example:
I want to redirect:
http://domain.com/advantage
To:
http://domain.com/index.php?page=some advantage
My current rule is
RewriteRule ^advantage "index.php?page=some advantage" [L,R=301]
This rule also redirects
http://domain.com/advantage-form.php
To the "som开发者_运维技巧e advantage" page
How do I fix this?
^advantage
should be ^advantage$
i.e. Instead of "Start, then advantage" it should be "Start, then advantage, then End".
This site is an expert on using mod_rewrite. Have a look at it. He is got lot of resources, if you are dealing with lot of rewrite rules. However whatever David said should work for the above question
精彩评论