我的网站根目录中有一个.htaccess,如下所示:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.mydomain\.pl [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?([a-z0-9_-]+)\.mydomain\.pl [NC]
RewriteRule ^/?$ /index.php?run=places/%1 [L,QSA]
RewriteCond %{REQUEST_URI} !^/index.php$
RewriteCond %{REQUEST_URI} !^/images/
RewriteCond %{REQUEST_URI} !^/upload/
RewriteCond %{REQUEST_URI} !^/javascript/
RewriteRule ^(.*)$ /index.php?runit=$1 [L,QSA]
但是当我输入时:
mydomain.pl/guests
我想正常去实际的文件夹客人。我知道我需要以某种方式为guest子文件夹禁用此规则,但我该如何做?
编辑:
我已经包含了整个.htaccess文件
答案 0 :(得分:18)
我在子文件夹中添加了一个htaccess并添加了RewriteEngine Off并且它可以正常工作。
答案 1 :(得分:0)
添加其中一个
RewriteEngine On
#If the request starts with guests, then pass it through
RewriteCond %{REQUEST_URI} ^guests
RewriteRule ^ - [L,QSA]
#Or, if the request contains an existing filename or directory, pass it through
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ - [L,QSA]