mod_rewrite sorunu

1 Cevap php

Ben şu kural vardır:

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

aşağıdaki gibi ve benim url:

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

Myphp.php On

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

Herhangi bir fikir?

Saygılarımızla,

1 Cevap

Bir B değiştirici eklemeyi deneyin:

Apache has to unescape URLs before mapping them, so backreferences will be unescaped at the time they are applied. Using the B flag, non-alphanumeric characters in backreferences will be escaped.

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