REGEXP/ISAPI_Rewrite
Jan 28, 2007I have modified this regular expression file for the ISAPI_Rewrite mod (for IIS), but its leaving out querystring param's. I've played with it but can't quite get it to work.
I can see WHY its not including them, I'm just not sure what the expression should be.
Example:
[url]
This should rewrite to path:
/username/?12345
Currently, the expression results in this:
/username/
Here's the code I'm using now:
[ISAPI_Rewrite]
# Any web site starts other than www will be re-mapped to /<subdomain>/
# Example: [url]
# Note: if the folder does not exists, then the user will get a 404 error automatically.
RewriteCond Host: (.*).domain.com
RewriteRule (.*) /$1$2 [I,O,L]
#Fix missing slash char on folders
#This has to be at the end because if invalid dir exists,
#we should show 404 first
RewriteCond Host: (.*)
RewriteRule ([^.?]+[^.?/]) http://$1$2/ [I,RP]