301 Redirect and query strings

Posted by icelizard on Server Fault See other posts from Server Fault or by icelizard
Published on 2010-03-23T16:46:16Z Indexed on 2010/03/23 16:53 UTC
Read the original article Hit count: 736

I am looking to create a 301 redirect based purely on a query string see b

OLD URL: olddomain.com/?pc=/product/9999
New URL: newurl.php?var=yup

My normal way of doing this would be

redirect 301 pc=/product/9999 newurl.php?var=yup

But this time I am trying to match a URL that that only contains the domain and a query string...

What is the best way of doing this?

Thanks

© Server Fault or respective owner

301 Redirect and query strings

Posted by Lizard on Stack Overflow See other posts from Stack Overflow or by Lizard
Published on 2010-03-23T16:09:06Z Indexed on 2010/03/23 16:23 UTC
Read the original article Hit count: 736

I am looking to create a 301 redirect based purely on a query string see b

OLD URL: olddomain.com/?pc=/product/9999
New URL: newurl.php?var=yup

My normal way of doing this would be

redirect 301 pc=/product/9999 newurl.php?var=yup

But this time I am trying to match a URL that that only contains the domain and a query string...

What is the best way of doing this?

Thanks

© Stack Overflow or respective owner

Related posts about 301-redirect

Related posts about mod-rewrite