I use mod_rewrite for most links to turn script/variable.htm into script.php?variable
I don't want to effect these, but I have some links that are script.php?variable...
Which I'd like to show as script.aspx?variable and have it rewrite to script.php?variable.
There will be multiple name=value pairs.
I tried this:
RewriteRule script.aspx?(.*) /script.php?$1 [L]
which does rewrite to the php script, but the paramaters are lost
I also tried
RewriteRule script.aspx?param1=(.)¶m2=(.) /script.php?param1=$1¶m2=$2
This doesn't rewrite to .php, just stays as .aspx and gets a not found error.
Seems like the problem with the first one is that the php script doesn't see the paramaters, and there may be a regular expression problem with the second.
Any help is much appreciated!