PDA

View Full Version : Mod_rewrite help



JoshuaJonah
October 11th, 2006, 11:48 AM
I'm working on a site where the URL vars have shifted because they migrated their database. For example "www.website.com/pages/search_details?tourid=ETTD000001" changed to "www.website.com/pages/search_details?tourid=ETWT00000001". These will be eliminated over tima as the id's are always incrimenting and they remove the old ones so i want to setup a mod_rewrite. However mod_rewrite hates me and will not cooperate. I have tried:

RewriteEngine on
RewriteRule ^/search_details?tourid=ETTD000001$ /search_details?tourid=ETWT00000001 [R,NC,L]
and putting that in a ".htaccess" in the pages folder. doesn't even try.

Any ideas?

JJ

JoshuaJonah
October 11th, 2006, 12:07 PM
oh, BTW, i have checked mod_rewrite is enabled:)

teiz77
October 12th, 2006, 04:12 AM
I think you need to specify the path from the root of your website. So try:


RewriteEngine on
RewriteRule ^pages/search_details?tourid=ETTD000001$ pages/search_details?tourid=ETWT00000001