Forum Home
Press F1
 
Thread ID: 87981 2008-03-11 05:19:00 mod rewrite help, old query string keeps appending to redirected URL Morgenmuffel (187) Press F1
Post ID Timestamp Content User
648504 2008-03-11 05:19:00 Hi

I have had a rather huge 14 line redirect running on a server after switching shopping carts/Store software, the redirect has done it's job nicely
All the search engines where correctly redirected and have updated to the new links, so i have decided to retire this redirect

However i want to replace it so that any one following the old link will end up in the root of the new store

Basically the below works to a point
(I want to redirect any link starting with "^cat_ID", and the below is the only way i got it to work, if you can see a way of making it shorter I am all ears)

oldsite link
mysite.com



RewriteCond %{QUERY_STRING} ^cat_ID=([0-9]+)&sub_ID=([0-9]+)&pg_ID=([0-9]+)&page_ID=2$
RewriteRule ^index\.php$ /shop/ [R=301,L]



it redirects to the root of the store but the url will look like this

mysite.com

instead of

mysite.com

so anyhelp would be appreciated
Morgenmuffel (187)
648505 2008-03-15 08:56:00 *bump* Renmoo (66)
1