Mod_rewrite problem

I have the following rule:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico 
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

      

and my url looks like this:

http://www.mydomain.com/189-9544737-0616922?%5Fencoding=UTF8&node=10

      

At myphp.php

var_dump($_GET): array(3) { 
  ["q"]=>  string(19) "185-8676848-3133633" 
  ["_encoding"]=>  string(4) "UTF8" 
  ["node"]=>  string(2) "10" } 

      

Any ideas?

Yours faithfully,

0


a source to share


1 answer


Try adding a modifier B

:

Apache has to remove URLs before matching them, so backlinks will be unconvinced at the time they are applied. Using flag B, non-alphanumeric characters in backlinks will be escaped.



RewriteRule ^(.*)$ index.php?q=$1 [B,L,QSA]

      

0


a source







All Articles