1
我想寫.htaccess
規則拒絕訪問到所有子文件夾的所有.php
文件,但允許在一個子目錄中獲得一個單一的文件,並在該文件中使用RewriteRule
,它的工作原理,如果Request URI
是不是空的,但是當我訪問/
它顯示故宮重寫規則禁止空請求URI
現在我有:
<Files ~ "\.(php)$">
deny from all
</Files>
<Files Test.php>
allow from all
</Files>
Options +FollowSymLinks
Options All -Indexes
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule^/Sub/Test.php [QSA]
如何使它按預期方式工作?