Ban specific file by IP address htaccess
Quick question: how can I use htaccess to bar a specific IP address from a spec开发者_C百科ific file?
Let's say the file is http://mydomain.com/special.pdf
And I have four IP addresses to prevent from accessing it.
you need something like this then
<Files special.pdf>
Deny from 127.0.0.1
Deny from 127.0.0.2
Deny from 127.0.0.3
Deny from 127.0.0.4
</Files>
精彩评论