I'm trying to rewrite the following URL
test.php?par1=foo&par2=bar
Into...
newtest.php?hidden_par=blah&par1=foo&par2=bar
I have this rule, that does not work:
RewriteRule ^test.php\??(.*?)$ newtest.php?hiden_par=blah&$1 [L]
Could this be done using RewriteCond or something else? (say, could this be done ?), thanks in advance.
You probably want something like the QSA ("query string append") flag, which causes the remainder of the query string to be properly appended onto the end of the rewritten URL.
For example:
^test.php test.php?hidden=value [L,QSA]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With