php - 禁用目录的 .htaccess

标签 php .htaccess subdirectory

我使用的框架具有以下 .htaccess 文件:

Options +FollowSymLinks +ExecCGI

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{REQUEST_URI}  !(\.png|\.jpg|\.gif|\.jpeg|\.bmp|\.ico)$
  RewriteRule ^(.*)$ entryPoint.php [QSA]
</IfModule>

这非常好,因为entryPoint.php 每次都会运行。但我有一个PhpBB论坛,放在SITEROOT/forum目录下。最好忽略此/forum 目录中的 .htaccess。如何在目录中设置忽略规则?

最佳答案

我对我的重写规则有点生疏,但是,

RewriteCond $1 !^/forum 

应该可以。

关于php - 禁用目录的 .htaccess,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7529058/

相关文章:

PHP 日志文件颜色

php - session Cookie 与持久性 Cookie

php - 警告 : mysqli_query(): Couldn't fetch mysqli

.htaccess - mod_rewrite RewriteCond 基于 Last-modified? (.htaccess)

c# - 第二个路径片段不能是驱动器或 UNC 名称 - 创建子目录错误

php - Joomla 中的数据库迁移

php - 从 apache 服务器的 SSL 中排除/var/www/html 中的文件

Php 和 htaccess 错误 - "no input file specified"

javascript - 子文件夹中未设置 cookie

ruby-on-rails - 乘客+nginx : Hosting a Rails application in a subdirectory