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.
精彩评论