即使我有[L] mod重写规则,为什么apache会改变浏览器的url?(Why is apache changing the browser's url even when I have

编程入门 行业动态 更新时间:2024-10-03 08:31:02
即使我有[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 不会更改。 问题是浏览器网址正在发生变化,令人沮丧。

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

我确保www,www / html或www / html / mediawiki中没有.htaccess文件。 我已尝试使用此处建议的[END]标志。 我在httpd.conf中没有任何其他重写规则。 怎么可能出错?

PS。 我诅咒谁把阿帕奇写到了地狱的深处。

Why is apache ignoring my [L] flag? I would expect to go to myhost.com/wtf and be taken to myhost.com/mediawiki/index.php without the URL in the browser changing. The problem is that the browser url IS changing, and its maddeningly frustrating.

Here's my simple test rule: RewriteEngine On RewriteRule ^/wtf.*$ /mediawiki/index.php [L]

I've ensured that there are no .htaccess files in www, www/html, or www/html/mediawiki. I've tried using the [END] flag as suggested here. I don't have any other rewrite rules in httpd.conf. What could be going wrong?

PS. I curse whoever wrote apache to the depths of hell.

最满意答案

您正在省略Apache配置的其余部分,或者更有可能的是,wiki正在尝试确保未配置为您想要的规范URL。

You're omitting the rest of your Apache config or, more likely, the wiki is trying to ensure a canonical URL which isn't configured to the one you want.

更多推荐

本文发布于:2023-07-09 10:17:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1085586.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:我有   重写   浏览器   规则   rewrite

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!