为什么即使我有 [L] mod 重写规则,apache 也会更改浏览器的 url?

Why is apache changing the browser's url even when I have an [L] mod rewrite rule?

为什么 apache 忽略我的 [L] 标志?我希望在浏览器中转到 myhost.com/wtf 并被带到 myhost.com/mediawiki/index.php URL改变。问题是浏览器 url 正在发生变化,而且令人抓狂。

这是我的简单测试规则: RewriteEngine On RewriteRule ^/wtf.*$ /mediawiki/index.php [L]

我已确保 www、www/html 或 www/html/mediawiki 中没有 .htaccess 文件。我试过按照建议 here 使用 [END] 标志。我在 httpd.conf 中没有任何其他重写规则。可能出了什么问题?

PS。我诅咒把apache写到地狱深处的人

您遗漏了 Apache 配置的其余部分,或者更可能的是,wiki 正试图确保规范 URL 未配置为您想要的配置。