我有问题阻止Apache重写URL,即使重启后也是如此

我有问题阻止Apache重写URL,即使重启后也是如此

问题描述:

All I want to do is be able to see a PHP file from the root without it going through the rewrites (thus our custom CMS).

Here's what I've done:

  1. In my httpd.conf, I've commented out the call to load the mod_rewrite module.
  2. Next, I've removed the .htaccess file from the root as it had the rewrite rules in it.
  3. I've rebooted the server.
  4. I've searched through phpinfo() and there are no "rewrite" strings to be found

The problem is that the server still rewrites and the request passes through our CMS.

I'm using XAMP (PHP 3.3.1, Apache 2.2.14)

What am I missing?

我想要做的就是能够从根目录看到一个PHP文件而不进行重写(因此 我们的自定义CMS)。 p>

以下是我所做的事情: p>

  1. 在我的httpd.conf中,我注释掉了调用加载 mod_rewrite模块。 li>
  2. 接下来,我已经从根目录中删除了.htaccess文件,因为它有重写规则。 li>
  3. 我重新启动了服务器。 li >
  4. 我搜索了phpinfo()并且没有找到“重写”字符串 li> ol>

    问题是服务器仍然重写 并且请求通过我们的CMS。 p>

    我正在使用XAMP(PHP 3.3.1,Apache 2.2.14) p>

    我缺少什么? p>

Leave it to the details... I was trying to access my_file.php on the root. However, the filename was actually my-file.php (dash vs underscore).

The page I was getting was a 404, which went through the CMS. When I access the proper file, the one with the dash, I get what I'm supposed to.

I appologize for the waste of time :)

maybe cache problem in your browser? because a similar thing happened to me and deleting the cache solved it.