[英]REQUEST_URI is populated with default-file (DirectoryIndex) /index.html
在使用Centos迁移到新服务器后,某些行为发生了变化。
提取http://example.com时,环境变量REQUEST_URI包含“ /index.html”(不包含index.html)。
我期望:
提取http://example.com时,REQUEST_URI为“ /”。
提取http://example.com/index.html时,REQUEST_URI为“ /index.html”。
这对我的.htaccess(重写器对'index.html'而不是'空字符串'的反应)以及我的脚本(Perl $ ENV {'REQUEST_URI'})都有影响。
仅获取http://example.com时,如何引起REQUEST_URI填充为“ /”?
尝试禁用DirectoryIndex和MultiViews,将其放在.htaccess的顶部:
DirectoryIndex disabled
Options -MultiViews
似乎仅在Plesk“主机设置”中将PHP支持设置为
'将PHP作为Nginx提供的FPM应用程序运行'
当我将其更改为
“将PHP作为Apache提供的FPM应用程序运行”或“将PHP作为Apache提供的FastCGI应用程序运行”
这里没有问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.