RewriteCond and Full QUERY_STRING

Posted by Tim on Stack Overflow See other posts from Stack Overflow or by Tim
Published on 2010-05-23T09:12:34Z Indexed on 2010/05/23 9:20 UTC
Read the original article Hit count: 302

I'm having hard time getting my head wrapped around this one - and it should be trivial.

I would like to redirect one URL with a specific query string to another URL.

I want to send any requests that contain the query string in the URL

http://mysite.com/index.php?option=com_user&view=register

To:

http://mysite.com/index.php?option=com_regme&view=form&regme=4&random=0&Itemid=6

If they add anything to the end of the first URL, it should still go to the second URL so that they cannot bypass the redirection. Nothing in the first query string needs to be preserved and passed to the second - all I want to do is change the URL completely.

I'm tearing my hair out trying to get this to work yet it should be trivial.

Suggestions?

Thanks,

-Tim

© Stack Overflow or respective owner

Related posts about regex

Related posts about redirect