2

在 httpd.conf 中,我在 webroot 中有一个重写规则

首先,我在子目录中关闭 mod_rewrite

<directory /home/xxxx/public_html/subdir>
  RewriteEngine off
</directory>

然后在需要的地方打开

<directory /home/xxxx/public_html>
  RewriteEngine On
  # bunch of rewrite rules
</directory>

但是重写引擎仍然在子目录中。我已经使用 RewriteLog 3 完成了日志记录,并看到它处理子目录中的文件。

我尝试将子目录移动到 httpd.conf 中的主目录部分下方,但它仍然处理子目录文件。

我知道我可以在我的主要规则中匹配和排除子目录,但我试图完全避免处理该目录以提高速度。

任何想法为什么或如何关闭子目录的 mod_rewrite ?

4

0 回答 0