domain.com/index/ 到 domain.com/index.phpApache的mod_rewrite的规则问题
domain.com/index/hello 到 domain.com/index.php/hello
该网站是使用PATH_INFO和默认规则不适用:
RewriteRule ^([^/]+)/(.*)$ $1.php/$2 [L]
我更改为:RewriteRule ^([^/.]+)((/[^/]+)*)/?$ $1.php$2 [L]
这是奇怪
domain.com/index/到domain.com/index.php 工作正常
domain.com/index/hello到domain.com/index.php/hello 不工作
并且它说未指定输入文件。
PHP是运行在快速CGI模式阿帕奇
我更改为:重写规则^( [^ /。] +)((/ [^ /] +)*)/?$ $ 1.php $ 2 [L]
http://domain.com/index/ to http://domain.com/ index.php正常工作
http://domain.com/index/hello to http://domain.com/index.php/hello not working – 2010-01-14 11:35:23