【问题标题】:http://example.com/foo/bar loading http://example.com/foo.phphttp://example.com/foo/bar 加载 http://example.com/foo.php
【发布时间】:2010-09-27 05:04:56
【问题描述】:

我最初认为这是我的 .htaccess 文件的问题,但是即使在禁用 mod_rewrite 之后问题仍然存在。 http://example.com/foo/bar 正在加载 http://example.com/foo.php,对于文件 foo 在服务器上的任何文件夹中都是如此。有谁知道是什么导致了这种行为以及如何阻止这种行为,因为我希望它加载http://example.com/foo.php?text=bar。我正在运行正常的 LAMP 设置,使用 Ubuntu 作为操作系统。

另外,这只发生在测试服务器上,而不是实时 VPS

【问题讨论】:

    标签: php .htaccess mod-rewrite redirect


    【解决方案1】:

    这可能是由于MultiViews。您可以通过以下方式禁用它:

    Options -MultiViews
    

    【讨论】:

    • 你,我的朋友,是众神之神。说真的,谢谢你的回答,你不想知道我花了多长时间解决这个问题
    猜你喜欢
    • 1970-01-01
    • 2011-11-14
    • 1970-01-01
    • 1970-01-01
    • 2015-05-21
    • 2016-01-16
    • 2017-12-16
    • 1970-01-01
    • 2019-04-23
    相关资源
    最近更新 更多