【问题标题】:Apache2 - why "http://localhost/index" redirect to "http://localhost/index.php"?Apache2 - 为什么“http://localhost/index”重定向到“http://localhost/index.php”?
【发布时间】:2011-04-30 10:35:56
【问题描述】:

我目前的环境是:Debian, apache2 & php5.

当我浏览"http://localhost/index" 时,会执行"http://localhost/index.php" 脚本。

如果我不想这样做,是否需要更改 apache 的配置?如果是,我该怎么做?

【问题讨论】:

  • 您可以为本地主机(默认域)发布您的虚拟主机或 .htaccess 文件吗?

标签: php configuration apache2


【解决方案1】:

这是由 apache 的 MultiViews 指令引起的。 请参阅此处的文档:http://httpd.apache.org/docs/2.0/content-negotiation.html#multiviews

【讨论】:

    猜你喜欢
    • 2018-01-21
    • 1970-01-01
    • 2015-01-11
    • 2020-12-28
    • 1970-01-01
    • 2021-04-09
    • 1970-01-01
    • 2012-12-11
    • 1970-01-01
    相关资源
    最近更新 更多