重写第二个排除文件夹


RewriteCond exclude folder

我在我的。htaccess中有以下内容:

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [L]

这工作得很好,但是我不希望rewriterrule为下面的文件夹及其子文件夹触发。

www.site.co.uk/Content

我该怎么做?

试试这个规则,

RewriteEngine on
RewriteRule ^(content)($|/) - [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [L]

或在content目录中创建一个。htaccess,并将

RewriteEngine off