Reputation: 5885
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:
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
To the "some advantage" page
How do I fix this?
Upvotes: 3
Views: 2125
Reputation: 1439
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
Upvotes: 0
Reputation: 944498
^advantage
should be ^advantage$
i.e. Instead of "Start, then advantage" it should be "Start, then advantage, then End".
Upvotes: 4