2017-08-28 100 views

回答

1

如果你想拒絕訪問從根lavel htaccess的子文件夾,您可以使用下面的RewriteRules:如果請求/ folderA /和/ FolderB中

RewriteRule ^folderA/$ - [R=403,L] 
RewriteRule ^folderB/$ - [R=403,L] 

規則將返回一個403 Forbidden錯誤。

0

你可以試試:

RewriteEngine On 
RewriteRule ^folder1/ - [F] 
RewriteRule ^someotherfolder/ - [F] 
# you can also use RegEx: 
RewriteRule ^folder([0-9]+)/ - [F] 
相關問題