我无法拒绝所有人在我的Htaccess中为每个人工作

时间:2012-06-01 05:44:29

标签: .htaccess

ErrorDocument 500 /errors/notfound.html
ErrorDocument 404 /errors/notfound.html
ErrorDocument 403 /errors/notfound.html

Options +FollowSymLinks

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?operationtoad.com/.*$ [NC]
RewriteRule \.(rar|exe|zip|html)$ - [F]
</IfModule>

order deny,allow
deny from all
allow from ##.###.###.##

当我在第二个允许行中添加第二个或第三个人时,他们可以看到主站点,但是他们无法访问/notfound.html或/anonexistingfile.html - 他们将看到apache启动器页面或他们得到500错误。

现在,如果我将自己从这个中删除,我只会在root上获得apache测试页面,而在其他页面上禁止403.

1 个答案:

答案 0 :(得分:0)

不是答案,但...... 您可以用htpassword替换它,而不是允许IP。

仔细检查你的RewriteRule条件,也许是其中的一个错误。