Problem
The problem is understanding the flag QSA. What this does is add the original query string to the redirected URL. This is useful in some cases when you want to add another parameter (or more than one) to the query string.
Example
Given the url:
http:
:
RewriteRule . /?var2=thisvalue
RewriteRule . /?var2=thisvalue [`QSA`]
:
Rule 1 > http://example.com/?var2=thisvalue
Rule 2 > http://example.com/?var2=thisvalue&var1=somevalue
, , ; ...
- , - ...
%{QUERY_STRING}:
RewriteEngine On
RewriteBase /
RewriteRule ^(.*) index.php?processurl=/$1?%{QUERY_STRING}
, :
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
URL-.
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?processurl=/$1?%{QUERY_STRING}