Mod Rewrite with Question Mark
Posted: Fri Aug 21, 2009 12:19 pm
Hi, I'm trying to do a redirect with Mod Rewrite in .htaccess:
RewriteRule ^folder/([0-9]+)-([a-zA-Z0-9\-]+)\?(.*) folder/page.php?id=$1&shortname=$2&$3 [L]
So
http://mydomain.com/folder/1-word?status=success should rewrite to
http://mydomain.com/folder/page.php?id= ... us=success
but this isn't working. If I switch the question mark to a comma (without escaping) then I can use a comma instead of the question mark, but that makes for an odd-looking URL, I'd rather use the standard question mark format. Are question marks not valid in this scenario?
Thanks for any help you can offer.
RewriteRule ^folder/([0-9]+)-([a-zA-Z0-9\-]+)\?(.*) folder/page.php?id=$1&shortname=$2&$3 [L]
So
http://mydomain.com/folder/1-word?status=success should rewrite to
http://mydomain.com/folder/page.php?id= ... us=success
but this isn't working. If I switch the question mark to a comma (without escaping) then I can use a comma instead of the question mark, but that makes for an odd-looking URL, I'd rather use the standard question mark format. Are question marks not valid in this scenario?
Thanks for any help you can offer.