: How to deal with URLs that has been hotlinked? My website assets have been hot linked by many other websites. I doubt whether these are responsible for the downtimes on my site. How should
My website assets have been hot linked by many other websites. I doubt whether these are responsible for the downtimes on my site.
How should I deal with such links?
Will deleting the links solve the issue?
Also, will hotlinking use up the servers entry process?
More posts by @Vandalay111
1 Comments
Sorted by latest first Latest Oldest Best
To stop hotlinking you can add the following to your .htaccess file. Replace example.com on line 3 with your own domain name. Also add or remove any file extensions on line 4
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)example.com/.*$ [NC]
RewriteRule .(gif|jpg|jpeg|png|bmp|zip|rar|mp3)$ - [F]
Maybe you prefer some mischief and want to serve alternate content when hotlinking is detected.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)example.com/.*$ [NC]
RewriteRule .(gif|jpg)$ www.example.com/backside.gif [R,L]
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.