文件夹层次结构
/html => maindomain.com
/html/_subdomain => subdomain.maindomain.com
/html/_subdomain/anotherdomain => anotherdomain.com and subdomain.maindomain.com/anotherdomain
/html/_subdomain/anotherdomain/admin => anotherdomain.com/admin and subdomain.maindomain.com/anotherdomain/admin
我正在寻找 .htaccess 代码来拒绝“anotherdomain.com/admin”并仅允许“subdomain.maindomain.com/anotherdomain/admin”用于此文件夹。我的代码
<Directory /html/subdomain/anotherdomain/admin>
Order Deny,Allow
Deny from all
Allow from subdomain.maindomain.com/anotherdomain/admin
</Directory>