开发者

Need to add $_GET args to my regex

    url.rewrite开发者_高级运维-once = (
    ".*\.(js|ico|gif|jpg|png|css|html)$" => "$0",
    "^/([^?]*)(\?.*)?$" => "/$1.php/$2",
)

This is what I got but the args don't work. I like following url

http://www.example.com/index.php/?r=something

To look like this:

http://www.example.com/index/?r=something

Thanx


If /index/?r=something is requested, it is rewritten to /index/.php/?r=something. So try this rule:

"^/([^?]*[^?/])/?(\?.*)?$" => "/$1.php/$2"

With this pattern the trailing slash is optional.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜