Retain query string on rewrite .htaccess Retain query string on rewrite .htaccess apache apache

Retain query string on rewrite .htaccess


Append the [QSA] flag (query string append).

RewriteRule ^photos/([a-zA-Z0-9_-]+)$ photoviewer.php?photo=$1 [L,QSA]


In your rule, replace [L] with [L,QSA].
That will then retain the query information.

Hope this helps!


[QSA,L] instead of just [L] should do the trick. Hope this helps!