Me :what's Hotlinking?
Wikepedia :
Quote
So when you store an image on your server/webhosting account , and link to it on your webpage , and another *webmaster* come and link to your image from his webpage , without your permission , we say that he is hotlinking your images , and consumming your bandwidth *stealing it !* , but this will not be a problem , when the site who linked your images has not a good traffic , since it don't cost you more then few Mo 's , but the real peoblem is when a website with a huge traffic is linking your images and stealing your bandwidth !!
So , what to do , and how to prevent it from happening?
Here's the idea:
You have to put this code , in your .htaccess file to avoid this kind of practice :
# Disallow hotlinks # Licensed from direct access RewriteCond% (HTTP_REFERER)! ^ $ # Licensed from my domain (mydomain) RewriteCond% (HTTP_REFERER)! ^ Http:// (www \.)?) (Mydomain \. Com / .* $ [NC] # Authorized translation from Google RewriteCond% (HTTP_REFERER)! Http://translate ^ \. Google \ ..* (www \.)?) (Mydomain \. Com .* $ [NC] # Permitted From the Google translation RewriteCond% (HTTP_REFERER)! Http://translate ^ \. Googleusercontent \ ..* (www \.)?) (Mydomain \. Com .* $ [NC] # Released for research images of GG RewriteCond% (HTTP_REFERER)! ^ Http:// .* \. Gstatic.com \ ..*/.*$ [CN] # Licensed from Google cache RewriteCond% (HTTP_REFERER)! Http://64 ^ \ .233 \. (167 | 183) \ .104 .* $ [NC] RewriteCond% (HTTP_REFERER)! Http://66 ^ \ .102 \ .9 \ .104 .* $ [NC] # Licensed from Google Image Search RewriteCond% (HTTP_REFERER)! Http://images ^ \. Google \ ..*/.*$ [CN] # Licensed from Yahoo cache RewriteCond% (HTTP_REFERER)! Http://72 ^ \ .30 \ .186 \ .56 .* $ [NC] RewriteCond% (HTTP_REFERER)! Http://216 ^ \ .109 \. (117 | 125) \. (130 | 135) .* $ [NC] # Licensed from the Yahoo search RewriteCond% (HTTP_REFERER)! ^ Http:// .* \. Search \. Yahoo \. Com / .* $ [NC] # Authorized translation from Yahoo and Altavista RewriteCond% (HTTP_REFERER)! Http://babelfish ^ \. (Yahoo | altavista) \. Com / .* (www \.)?) (Mydomain \. Com .* $ [NC] # Licensed from MSN Image Search RewriteCond% (HTTP_REFERER)! Http://search ^ \. Msn \ ..*/.*$ [CN] # Licensed from cache MSN RewriteCond% (HTTP_REFERER)! Http://cc ^ \. Msnscache \. Com / .* $ [NC] # Licensed from the Lycos search RewriteCond% (HTTP_REFERER)! Http://vachercher ^ \. Lycos \. Com / .* $ [NC] # Released for Search Ask RewriteCond% (HTTP_REFERER)! ^ Http:// .* \. Ask \. Com / .* $ [NC] # Released for Search Gigablast RewriteCond% (HTTP_REFERER)! ^ Http:// .* \. Beta \. Gigablast \. Com / .* $ [NC] # Released for Search Picsearch RewriteCond% (HTTP_REFERER)! ^ Http:// .* \. Picsearch \ ..*/.*$ [CN] RewriteCond% (HTTP_USER_AGENT) "^ Googlebot [CN] RewriteCond% (HTTP_USER_AGENT) "^ Googlebot-Image [CN] RewriteCond% (HTTP_USER_AGENT) "^ Googlebot-Mobile [CN] RewriteCond% (HTTP_USER_AGENT)! MSNBot ^ [CN] RewriteCond% (HTTP_USER_AGENT)! ^ Slurp [NC] RewriteCond% (HTTP_USER_AGENT)! ^ Mediapartners-Google [CN] # Redirect to file nohotlink depending on the type of file RewriteRule .* \. (Jpe? G | gif | bmp | png) $ http:// (destination-website) / hotlink. $ 1 [NC, R, L]
Replace mydomain () with your domain extension and (destination-website) to a Free web space, rapidshare for example, or others it's your choice !
















