需要否认,除了我的所有IP访问网站,并显示友好的错误 [英] Need to deny all IPs except mine from accessing site and display friendly error
问题描述
我要否认,除了我的所有IP地址。
我得到了我的whatismyip.com朝外的IP。让我们假设它是200.200.200.200
下面是我的.htaccess的开端
的ErrorDocument 403 /down.html
<限制GET POST>
为了否认,允许
所有否认
允许从200.200.200.200
< /限制>
该工作原理与否认一部分 - 它显示了我down.html页面。然而,它不认我的,即使我把我的正确的IP中的.htaccess。难道我做错了什么?
另外,down.html页面包含一个图像 - 但看到所有的请求都被拒绝,我只好主持它在不同的领域得到它的显示。我的.htaccess技巧有点生疏,但我将如何去让一个形象的请求,通过使用的.htaccess该域名?
<限制GET POST>
为了允许,拒绝
允许从200.200.200.200
所有否认
< /限制>
I need to deny all IPs except mine.
I got my outward facing IP from whatismyip.com. Let's assume it is 200.200.200.200
Here is the beginning of my .htaccess
ErrorDocument 403 /down.html
<Limit GET POST>
order deny,allow
deny from all
allow from 200.200.200.200
</Limit>
This works with the denying part - it shows my down.html page. However it denies me even when I place my correct IP in the .htaccess. Am I doing something wrong?
Also the down.html page contains an image - but seeing as all requests are being denied, I had to host it on a different domain to get it to display. My .htaccess skills are a little rusty, but how would I go about allowing that one image request through using .htaccess on this domain?
<Limit GET POST>
order allow,deny
allow from 200.200.200.200
deny from all
</Limit>
这篇关于需要否认,除了我的所有IP访问网站,并显示友好的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!