使文件夹异常mod重写

时间:2014-10-01 17:10:02

标签: apache .htaccess exception mod-rewrite directory

我一直在寻找重写规则来制作一个异常形式的重写规则,但没有任何效果。 我想从重写规则中排除文件夹klient。我试过

RewriteCond %{REQUEST_URI} !^/klient/* [NC]

但没有发生...... :-( 所有htaccess都在这里

RewriteCond %{REQUEST_URI} !^/klient/* [NC]
RewriteRule ^index-(.*).html ./index.php?jazyk=$1 [L,QSA]
RewriteRule ^(.*)-strana(.*).html ./index.php?url=$1.html&strana=$2 [L,QSA]
RewriteRule ^clanek_(.*)_(.*)$  ./index.php?id_clanku=$1 [L,QSA]
RewriteRule ^rssfeed.xml$   ./index.php?rssFeed=1 [L,QSA]
RewriteRule ^diskuze-([0-9]+)-[^/]+.html?$ index.php?id_diskuze=$1 [L,QSA] 
RewriteRule ^mailing_(.*)_(.*)$ ./mailing.php?sablona=$1 [L,QSA]
RewriteRule ^(.*)\.html$    ./index.php?url=$1.html [L,QSA]

有没有办法排除我的客户端文件夹?

由于

1 个答案:

答案 0 :(得分:0)

你可以这样做

# leave if it is /klient/ folder
RewriteCond %{REQUEST_URI} ^/klient/ [NC]
RewriteRule ^ - [L]

# your other rules here