Pergunta

Ok guys i tem talvez um problema estúpido, mas eu sou provavelmente o mudo;)

Eu tenho essa .htaccess simples:

Options +FollowSymlinks
RewriteEngine on
RewriteBase /

RewriteRule ^news/([^/]+)$               news-inside.php?n=$1 [L]
RewriteRule ^news/?$                  news.php [L]


RewriteCond %{REQUEST_FILENAME} !-f

Cada vez que eu tento entrar em primeira regra, digitando algumas urls como estes:

http: // host / news / algo

i redirecionado para a news.php arquivo, para não news-inside.php com a string de consulta!

olhando para o $ _GET e $ _SERVER da página alcançado, este é o resultado:

$_GET => empty

$_SERVER (some)

  'REQUEST_METHOD' => string 'GET' (length=3)
  'QUERY_STRING' => string '' (length=0)
  'REQUEST_URI' => string '/news/something' (length=15)
  'SCRIPT_NAME' => string '/news.php' (length=9)
  'PATH_INFO' => string '/something' (length=10)
  'PATH_TRANSLATED' => string '/var/www/rolo/something' (length=23)
  'PHP_SELF' => string '/news.php/something' (length=19)

Todas as ideias ??

Foi útil?

Solução

Tente desativar MultiViews :

Options -MultiViews
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top