I want to mod_rewrite a URL to another page, but then I also want any query strings added to be preserved.
RewriteEngine On
#enforce trailing slashes
Rewrit
You need to add the [QSA] flag ("query string append")
RewriteRule ^apps/([A-Za-z0-9-_]+)/?$ index.php&app=$1 [L,QSA]
For page 301 redirects with the [R]
flag as opposed to internal rewrites like this one, the query string is automatically appended. However, you must force it with [QSA]
for the internal rewrite.