【发布时间】:2016-03-22 15:40:57
【问题描述】:
我有一个 .htaccess:
<FilesMatch "\.php$|\.js$">
SetHandler application/x-httpd-php
</FilesMatch>
如何排除子目录?
非常感谢。
【问题讨论】:
-
您不能使用 filesMatch 排除文件夹,请使用 mod-rewrite
我有一个 .htaccess:
<FilesMatch "\.php$|\.js$">
SetHandler application/x-httpd-php
</FilesMatch>
如何排除子目录?
非常感谢。
【问题讨论】:
试试这个:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/folder_to_exclude
RewriteRule \.(php|js)$ - [H=application/x-httpd-php]
【讨论】: