0

i want rewrite a url to another using mod_rewrite.. but i want to preserve the query parameters and and POST data even after the rewrite. And i want to add a new parameter to the url when rewriting it... For example

This -> http://example.com/test/?user=234343

To -> http://example.com/othertest/user=234343&new_param=CUSTOM_VALUE //i'll just type this value in the .htaccess file

It will be very helpful if anyone could show me an example how to do it.

4

1 回答 1

0

未经测试,但尝试:

RewriteRule     ^test/?user=([0-9]+)$ /othertest/user/$1&new_param=CUSTOM_VALUE [L]
于 2012-10-13T10:49:55.473 回答