htaccess文件在某种程度上被缓存? [英] htaccess file somehow being cached?
问题描述
我有一个.htaccess文件做的网页名称一个非常简单的重写。这是该文件的内容:
I had a .htaccess file doing a very simple rewrite of the page names. This is the contents of the file:
Options +FollowSymlinks
RewriteEngine on
RewriteRule setup setup.php [NC]
我现在想停下来重写设置到setup.php - 我该怎么办呢?我试着删除该文件中的行,我试图删除文件并重新启动Apache和它的还是的改写设置为setup.php。我如何使它停下来?这似乎是完全无视其他任何.htaccess文件创建,并没有什么被写入错误日志。难道是缓存文件的地方?我该如何阻止它?
I now want to stop rewriting setup to setup.php - how do I do this? I've tried removing the line from the file, I've tried deleting the file and restarting apache, and it is still rewriting setup to setup.php. How do I make it stop? It seems to be completely ignoring any other .htaccess file I create, and there's nothing being written to the error log. Is it caching the file somewhere? How do I stop it?
我使用的是在Ubuntu的Apache2。
I'm using apache2 on ubuntu.
推荐答案
问题是,多视图
已启用。 多视图
自动添加扩展到任何请求的URL,如果可能的话。这无关你的重写规则;它只是恰巧,你重写设置
到 setup.php
让多视图
键,您的规则在做同样的事情。
The problem is that MultiViews
is enabled. MultiViews
automatically adds extensions to any requested URLs, if possible. This has nothing to do with your RewriteRule; it just so happens that you were rewriting setup
to setup.php
so MultiViews
and your rule were doing the same thing.
添加 -MultiViews
到选项
指令禁用它。
这篇关于htaccess文件在某种程度上被缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!