.htaccess - Stop hotlinking from another IP -


i have lot of domains , these hosting on 1 ip.

i tried use below code in htaccess protect hotlinking, doesn't work.

rewriteengine on rewritecond %{http_referer} !^$ rewritecond %{http_referer} !^http://(www\.)?103.222.219.45/.*$ [nc] rewriterule \.(jpg|jpeg|png|gif|ico|pdf|zip|js|css)$ - [f] 

how can protect hotlinking form ips?

the referer header contains url of previous page. contain ip address if ip address used in url instead of host name.

you need explicitly specify each of acceptable host names.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -