【发布时间】:2019-06-23 12:53:28
【问题描述】:
在使用 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 填充'/'?
【问题讨论】:
标签: apache request-uri directoryindex