Warning: include() [function.include]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in /home/blackst/public_html/tutorials/stophotlinking.php on line 1

Warning: include(http://black-stripes.net/header.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/blackst/public_html/tutorials/stophotlinking.php on line 1

Warning: include() [function.include]: Failed opening 'http://black-stripes.net/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/blackst/public_html/tutorials/stophotlinking.php on line 1

Stop hot linking


Isn't it annoying when your bandwith expands due to hot linking? This tutorial will show you how to make an end to it.


1. Open .htaccess, or make a new document of you already got one. Paste this code:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?<b>dinside.com</b>/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?<b>dinside.com</b>.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]


2. Change the bold text to your site name. This way, the pic won't show where it's hot linked. You can laso make a new pic appear, like an ad to your site:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?<b>dinside.com</b>/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?<b>dinside.com</b>.*$ [NC]
RewriteRule \.(gif|jpg)$ http://www.<b>dinside.com/evil.gif</b> [R,L]

3. Change the bold to your info.
Warning: include() [function.include]: http:// wrapper is disabled in the server configuration by allow_url_include=0 in /home/blackst/public_html/tutorials/stophotlinking.php on line 33

Warning: include(http://black-stripes.net/footer.php) [function.include]: failed to open stream: no suitable wrapper could be found in /home/blackst/public_html/tutorials/stophotlinking.php on line 33

Warning: include() [function.include]: Failed opening 'http://black-stripes.net/footer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/blackst/public_html/tutorials/stophotlinking.php on line 33