Answer the question
In order to leave comments, you need to log in
How to restrict access to site resources from certain ip?
Guys, please tell me how to prohibit loading images, styles, scripts (hotlinks) on other resources with a specific ip through the .htaccess file?
Found this code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?site.ru [NC]
RewriteRule \.(jpg|jpeg|png|gif|css|js)$ - [NC,F,L]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question