Forum Moderators: phranque
I'm trying to make
www.vidblogs.com/username
redirect to
www.vidblogs.com/cgi-bin/main.pl?username
but the? I need is encoded and instead it redirects to
www.vidblogs.com/cgi-bin/main.pl%3fusername
My code is:
RedirectMatch ^/([^about.*¦style.*¦image.*¦index.*¦cgi.*¦forums.*¦signup.*].*)$ /cgi-bin/main.pl?$1
The extra terms in the regular expression are to avoid matching files in the root that I need.
Is there a way to do this with RewriteRule that won't encode the question mark?
Welcome to WebmasterWorld!
If you adapt your code to mod_rewrite, the question mark should be passed through unchanged. You can also choose between doing an external redirect, which publishes your dynamic URL, or doing an internal server rewrite which simply passes the request to your script. This depends on the RewriteRule syntax you choose.
Jim