Having a problem with a client’s site and foreign stations hotlinking to their image files. This is hosted on a Windows server and I tried using a web.config file to stop it. I found out after many tries that the code would not work on Server 2003 so I moved the site to where it would be on Server 2008. This morning the site came up after going through DNS prop and I uploaded the web.config file with the hotlinking code it it. Site worked great, the code worked as I went to the offender’s site and none of the images previously displayed were showing.
About seven hours later I checked on the site and received a 500 error which was odd since no one had changed anything. I deleted the web.config file that worked previously and the site came up. If I put the web.config file back online it caused 500 error. The strange part is that I uploaded this same web.config file this morning and everything worked. The site was up and the offender blocked. Now I can’t seem to block these three sites from hotlinking and have wasted hours moving the site to a newer server which doesn’t seem to help.
Here is the code for the web.config file that was operational this morning:
Is this code correct or am I unable to stop these leeches? The reason it is important to block these sites is that the client’s site has take a bit of a hit from Google because of bad neighborhood issues. These bad neighborhoods just so happen to be the hotlinkers. Sure I can just change the folder name and and reup the files but it will be a matter of time before they adjust their bots.
Any and all help would be appreciated.