我有一个包含以下.htaccess文件的子域名:
Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
这是一个标准的symfony1.x(php框架)htaccess文件。我添加了一个abc
目录,但是当我想在浏览器中查看它时,我被重定向到index.php。我应该在.htaccess文件中添加什么来让我查看abc目录并单独保留所有其他重定向?
答案 0 :(得分:0)
在RewriteEngine On
行下面添加此规则:
# ignore all below rules for abc directory
RewriteRule ^abc(/.*)?$ - [L,NC]