htaccess文件在某种程度上被缓存? [英] htaccess file somehow being cached?

查看:136
本文介绍了htaccess文件在某种程度上被缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆