Apache/Server Category

Prevent media hotlinking with .htaccess

Monday, February 23rd, 2009 at 00:34:59
0

Hotlinking to media present on another domain is the practice of using files hosted on other people domains. Leeching other peoples bandwidth is not a nice thing to do, so if you find someone hotlinking media files from your site, you can stop it and regain control of your bandwidth consumption.

You need to edit your .htaccess file. You can even mess things up a little for them by setting a default media file that will be shown instead of the media file they would like to display.

Open your .htaccess (or create a new one), and add these lines: