apache - RewriteRule redirect not including parameters -
what want redirect
to
http://example.com/this/that/?which=those
this have tried;
rewriterule ^sample.*$ http://example.com/this/that/?which=those [r=301,l]
but redirects http://example.com/this/that/ , without parameter.
only when write (random) after url, redirects correctly, including parameter.
what doing wrong? appreciated!!
all need rule:
rewriterule ^sample/?$ /this/that/?which=those [r=302,l,nc,qsa]
make sure clear browser cache , restart browser once before testing this.
important: remember not use r=301 (permanent redirect)
while testing mod_rewrite rules. after verify working, change r=302 (temporary redirect)
r=301 (permanent redirect)
Comments
Post a Comment