1

我想这样做:

文档根/.htaccess:

 - allow access only if a user comes from a specific ip OR if he can authenticate 
 - all others should be rejected

文档根/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 文件继承,我无法正确处理,但我希望你们中的某个人能够解决我的问题。

怎么做?

4

1 回答 1

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”。

于 2013-10-17T20:41:54.077 回答