我想这样做:
的DocumentRoot / htaccess的:
- allow access only if a user comes from a specific ip OR if he can authenticate
- all others should be rejected
的DocumentRoot / somedir /:
- same rules as in documentRoot
的DocumentRoot / otherdir / htaccess的:
- 202.111.22.3 should be rejected
- for the rest: allow access only if a user comes from a specific ip OR if he can authenticate
的DocumentRoot / otherdir / csvexport / htaccess的:
- allow access to every one
我的问题是来自父htaccess文件的继承,我无法做到正确,但我希望你们中的某个人能够解决我的问题。
怎么做?
答案 0 :(得分:0)
所以你会有这样的事情:
的DocumentRoot / htaccess的
Allow From 12.34.56.78
Require valid-user
Satisfy any
的DocumentRoot / otherdir / htaccess的:
Deny From 202.111.22.3
Allow From 12.34.56.78
Require valid-user
Satisfy any
的DocumentRoot / otherdir / csvexport / htaccess的:
Allow From All
12.34.56.78
是您要允许的“特定IP”。