Mobile app version of vmapp.org
Login or Join
Vandalay111

: 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

@Vandalay111

Posted in: #Cpanel #Downtime #Hotlinking

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?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay111

1 Comments

Sorted by latest first Latest Oldest Best

 

@Pierce454

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]

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme