开发者

Ban specific file by IP address htaccess

开发者 https://www.devze.com 2023-03-30 15:42 出处:网络
Quick question: how can I use htaccess to bar a specific IP address from a spec开发者_C百科ific file?

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消