2016-03-22 80 views
-1

一個filesMatch我有一個的.htaccess:排除文件夾中的htaccess的

<FilesMatch "\.php$|\.js$"> 
    SetHandler application/x-httpd-php 
</FilesMatch> 

我怎樣才能排除一個子目錄?

非常感謝。

+0

不能排除使用filesMatch文件夾,使用國防部重寫 – starkeen

+0

我將使用國防部重寫排除目錄? – Klaxx

回答

0

試試這個:

RewriteEngine on 


RewriteCond %{REQUEST_URI} !^/folder_to_exclude 
RewriteRule \.(php|js)$ - [H=application/x-httpd-php] 
+0

謝謝,但不幸的是,這使得我的網站進入「內部服務器錯誤」模式 – Klaxx

+0

我用我的文件夾的絕對和相對路徑 – Klaxx

+0

好吧,在我的子目錄中有另一個導致505錯誤的htaccess。它正在工作。謝謝! – Klaxx