开发者

Why does rewrite rule ^(.*)$ set variable $1 to index.php

I have rewriting enabled.

I go to domain/bar and expect it to be rewritten to domain/index.php?foo=bar but I get d开发者_StackOverflowomain/index.php?foo=index.php instead :o

RewriteRule ^(.*)$ index.php?foo=$1

Why isn't $1 set to bar?


This works fine for me, try it:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?foo=$1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜