<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Hotlink Protection with .htaccess</title>
	<atom:link href="http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/</link>
	<description>WordPress Plugins, PHP Scripts, Tools, and Tutorials</description>
	<pubDate>Mon, 13 Oct 2008 00:29:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: glitters</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-455973</link>
		<dc:creator>glitters</dc:creator>
		<pubDate>Sun, 07 Sep 2008 00:29:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-455973</guid>
		<description>It will be nice to know how to protect flash files, I have seen sites that use .php and protect their flash files, this site over here have a cool way of protecting their files: juegosdiarios.com</description>
		<content:encoded><![CDATA[<p>It will be nice to know how to protect flash files, I have seen sites that use .php and protect their flash files, this site over here have a cool way of protecting their files: juegosdiarios.com</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leon</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-262987</link>
		<dc:creator>Leon</dc:creator>
		<pubDate>Sat, 19 Apr 2008 00:48:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-262987</guid>
		<description>A bit late in the day but the info may help others using this method.

I believe you can also put it inside the WP rule as in:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\\.)?yoursite\\.com [NC]
RewriteRule .*.(gif&#124;jpe?g&#124;png&#124;bmp)$ [F,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

but I've not used this method, and as a suggestion to others I wouldn't use 'http' urls inside the htaccess file for directing to an 'hotlinking' image, use the path method as used by author '/images/hotlink.$1'


@ Marc (20)

Unfortunately it will display from their cache but try changing the name of the image.

@ Jogos (24)

I think you only need to add 'swf' to the 'RewriteRule' and not the path to the file(s):
ie: RewriteRule \\.(gif&#124;jpe?g&#124;swf)$

@ nasir (22)

Maybe specify 'jpg' in the Rewrite Rule and have your thumbs as 'jpeg' ?

@ Manuel (13)

Yes it does break images for RSS feeds but there are workarounds depending on your platform.

ie: In Wordpress there is a hotlinking plugin that stores the RSS images in a different folder and uses them for the feeds.

and I've seen an htaccess RewriteRule somewhere that works but you have to specify each feed separately, you'll have to do a search as I can't remember where it was, but it is possible.</description>
		<content:encoded><![CDATA[<p>A bit late in the day but the info may help others using this method.</p>
<p>I believe you can also put it inside the WP rule as in:</p>
<p># BEGIN WordPress</p>
<p>RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !^http://(www\\.)?yoursite\\.com [NC]<br />
RewriteRule .*.(gif|jpe?g|png|bmp)$ [F,NC]<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . /index.php [L]</p>
<p># END WordPress</p>
<p>but I&#8217;ve not used this method, and as a suggestion to others I wouldn&#8217;t use &#8216;http&#8217; urls inside the htaccess file for directing to an &#8216;hotlinking&#8217; image, use the path method as used by author &#8216;/images/hotlink.$1&#8242;</p>
<p>@ Marc (20)</p>
<p>Unfortunately it will display from their cache but try changing the name of the image.</p>
<p>@ Jogos (24)</p>
<p>I think you only need to add &#8217;swf&#8217; to the &#8216;RewriteRule&#8217; and not the path to the file(s):<br />
ie: RewriteRule \\.(gif|jpe?g|swf)$</p>
<p>@ nasir (22)</p>
<p>Maybe specify &#8216;jpg&#8217; in the Rewrite Rule and have your thumbs as &#8216;jpeg&#8217; ?</p>
<p>@ Manuel (13)</p>
<p>Yes it does break images for RSS feeds but there are workarounds depending on your platform.</p>
<p>ie: In Wordpress there is a hotlinking plugin that stores the RSS images in a different folder and uses them for the feeds.</p>
<p>and I&#8217;ve seen an htaccess RewriteRule somewhere that works but you have to specify each feed separately, you&#8217;ll have to do a search as I can&#8217;t remember where it was, but it is possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nihar</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-254376</link>
		<dc:creator>Nihar</dc:creator>
		<pubDate>Fri, 11 Apr 2008 08:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-254376</guid>
		<description>Gr8 article. I was having a tough time setting up hotlinking on my site with wordpress blog setup on it. Even the my hosting service guys were unable to solve it. then i googled it and found the solution.

If i keep hotlinking code before wordpress code. then it works.

Thanks again</description>
		<content:encoded><![CDATA[<p>Gr8 article. I was having a tough time setting up hotlinking on my site with wordpress blog setup on it. Even the my hosting service guys were unable to solve it. then i googled it and found the solution.</p>
<p>If i keep hotlinking code before wordpress code. then it works.</p>
<p>Thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jogos</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-122805</link>
		<dc:creator>Jogos</dc:creator>
		<pubDate>Wed, 26 Dec 2007 16:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-122805</guid>
		<description>I want to block my SWF file (flash files). I tried this code and it did not work.

RewriteEngine on 
RewriteCond %{HTTP_REFERER} . 
RewriteCond %{HTTP_REFERER} !^http://(www\\.)?MYDOMAIN\\.com [NC] 
RewriteRule \\.(swf)$ /games/arquivo/hotlink.swf [L]


Why is not working ?</description>
		<content:encoded><![CDATA[<p>I want to block my SWF file (flash files). I tried this code and it did not work.</p>
<p>RewriteEngine on<br />
RewriteCond %{HTTP_REFERER} .<br />
RewriteCond %{HTTP_REFERER} !^http://(www\\.)?MYDOMAIN\\.com [NC]<br />
RewriteRule \\.(swf)$ /games/arquivo/hotlink.swf [L]</p>
<p>Why is not working ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Csaba</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-89197</link>
		<dc:creator>Csaba</dc:creator>
		<pubDate>Fri, 12 Oct 2007 01:28:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-89197</guid>
		<description>I have a question: on my mandrake linux server, i have several virtual hosts, and hotlinking works only for those directories that are server from under MAIN document root; however, for images stored under /home/$userdir , it does not work even if i put a .htaccess file there, too ! Any suggestion ?</description>
		<content:encoded><![CDATA[<p>I have a question: on my mandrake linux server, i have several virtual hosts, and hotlinking works only for those directories that are server from under MAIN document root; however, for images stored under /home/$userdir , it does not work even if i put a .htaccess file there, too ! Any suggestion ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nasir</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-78387</link>
		<dc:creator>nasir</dc:creator>
		<pubDate>Sat, 01 Sep 2007 20:39:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-78387</guid>
		<description>i have hotlink protection on my website it works great, but i want to modify it such that it does not block only the files which start with 'thumb_' and block the rest of files can some one help me with this.

this is the possible line that i have coded but does not work.

RewriteRule !.*/thumb_\.(jpg&#124;jpeg&#124;gif)$ http://www.hqcelebphotos.com/error.png [NC,R,L]</description>
		<content:encoded><![CDATA[<p>i have hotlink protection on my website it works great, but i want to modify it such that it does not block only the files which start with &#8216;thumb_&#8217; and block the rest of files can some one help me with this.</p>
<p>this is the possible line that i have coded but does not work.</p>
<p>RewriteRule !.*/thumb_\.(jpg|jpeg|gif)$ <a href="http://www.hqcelebphotos.com/error.png" rel="nofollow">http://www.hqcelebphotos.com/error.png</a> [NC,R,L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zack</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-66518</link>
		<dc:creator>Zack</dc:creator>
		<pubDate>Mon, 23 Jul 2007 09:08:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-66518</guid>
		<description>This article came in handy for my sites. Appreciate it! Helped a lot. keep up the good work!</description>
		<content:encoded><![CDATA[<p>This article came in handy for my sites. Appreciate it! Helped a lot. keep up the good work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-65378</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Thu, 19 Jul 2007 02:31:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-65378</guid>
		<description>Hey Admin,

Great article. Made sure to bookmark you on my new del.icio.us account :)

I got my htaccess file working and it's stopping the hotlinking. Unfortunately when they visit the offender's page, my replacement image gets cached in their hard drives. When they visit my site after reading (IMAGE AVAILABLE AT XYZ.COM), the images from my site are loaded from their cache instead of from my site, using the accepted referrer. Any way around this?  I don't want to institute something like "nocache" on my site (even if it would help) because it would eat up a lot of bandwidth I'm trying to conserve. 

Haha long little comment but maybe you or someone else might have some thoughts!

Cheers,

Marc</description>
		<content:encoded><![CDATA[<p>Hey Admin,</p>
<p>Great article. Made sure to bookmark you on my new del.icio.us account <img src='http://www.dagondesign.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I got my htaccess file working and it&#8217;s stopping the hotlinking. Unfortunately when they visit the offender&#8217;s page, my replacement image gets cached in their hard drives. When they visit my site after reading (IMAGE AVAILABLE AT XYZ.COM), the images from my site are loaded from their cache instead of from my site, using the accepted referrer. Any way around this?  I don&#8217;t want to institute something like &#8220;nocache&#8221; on my site (even if it would help) because it would eat up a lot of bandwidth I&#8217;m trying to conserve. </p>
<p>Haha long little comment but maybe you or someone else might have some thoughts!</p>
<p>Cheers,</p>
<p>Marc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Troll</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-63432</link>
		<dc:creator>Troll</dc:creator>
		<pubDate>Wed, 11 Jul 2007 20:36:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-63432</guid>
		<description>I think it's important to mention IIS Mod-Rewrite Pro:

http://www.micronovae.com/ModRewrite/ModRewrite.html

It is fully compatible with apache mod_rewrite and also supports .htaccess!</description>
		<content:encoded><![CDATA[<p>I think it&#8217;s important to mention IIS Mod-Rewrite Pro:</p>
<p><a href="http://www.micronovae.com/ModRewrite/ModRewrite.html" rel="nofollow">http://www.micronovae.com/ModRewrite/ModRewrite.html</a></p>
<p>It is fully compatible with apache mod_rewrite and also supports .htaccess!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-39352</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Tue, 10 Apr 2007 13:35:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-39352</guid>
		<description>I forgot to write... On my site you are free to browse with that, but when somebody (even google) link me, then it shows that 403...</description>
		<content:encoded><![CDATA[<p>I forgot to write&#8230; On my site you are free to browse with that, but when somebody (even google) link me, then it shows that 403&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Admin</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-38993</link>
		<dc:creator>Admin</dc:creator>
		<pubDate>Sun, 08 Apr 2007 19:39:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-38993</guid>
		<description>&lt;b&gt;Ryan&lt;/b&gt;: Personally, I put my hotlink code before the WordPress code in the .htaccess.</description>
		<content:encoded><![CDATA[<p><b>Ryan</b>: Personally, I put my hotlink code before the WordPress code in the .htaccess.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-38896</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sun, 08 Apr 2007 05:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-38896</guid>
		<description>I've got a question specifically about htaccess and Wordpress.  Where do I place the hotlink protection code in the file?  Before or after the Wordpress portion?  It's currently after the Wordpress code and before SEO ReWrite.  Thanks!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve got a question specifically about htaccess and Wordpress.  Where do I place the hotlink protection code in the file?  Before or after the Wordpress portion?  It&#8217;s currently after the Wordpress code and before SEO ReWrite.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Admin</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-38810</link>
		<dc:creator>Admin</dc:creator>
		<pubDate>Sat, 07 Apr 2007 18:26:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-38810</guid>
		<description>&lt;b&gt;Sri&lt;/b&gt;: You mean to allow another site to hotlink? Just duplicate the line:

&lt;code&gt;RewriteCond %{HTTP_REFERER} !^http://(www\.)?yahoo\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?google\.com [NC]&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p><b>Sri</b>: You mean to allow another site to hotlink? Just duplicate the line:</p>
<p><pre><code>RewriteCond %{HTTP_REFERER} !^http://(www\.)?yahoo\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?google\.com [NC]</code></pre></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sri</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-38767</link>
		<dc:creator>Sri</dc:creator>
		<pubDate>Sat, 07 Apr 2007 09:07:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-38767</guid>
		<description>Hallo Dear,

I Have Some Question !
When I Have Already One Customs Error Page In .htaccess File How Can I Add It One more .htaccess File In Our Server ?
Or Just We Have To Add In Same File ?

And Can You Pleas Preview One Example Pleas ? 

For Example Take Yahoo.com !

RewriteEngine on
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yahoo\.com [NC]
RewriteRule \.(hotlink.jpg)$ - [NC,F]

Is That OK ?
I Was Trying To My Site But It's Not Working !
Pleas Give A Example If You Want !!

Thanks A Lot !
All The Best</description>
		<content:encoded><![CDATA[<p>Hallo Dear,</p>
<p>I Have Some Question !<br />
When I Have Already One Customs Error Page In .htaccess File How Can I Add It One more .htaccess File In Our Server ?<br />
Or Just We Have To Add In Same File ?</p>
<p>And Can You Pleas Preview One Example Pleas ? </p>
<p>For Example Take Yahoo.com !</p>
<p>RewriteEngine on<br />
RewriteCond %{HTTP_REFERER} .<br />
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yahoo\.com [NC]<br />
RewriteRule \.(hotlink.jpg)$ - [NC,F]</p>
<p>Is That OK ?<br />
I Was Trying To My Site But It&#8217;s Not Working !<br />
Pleas Give A Example If You Want !!</p>
<p>Thanks A Lot !<br />
All The Best</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manuel</title>
		<link>http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-35972</link>
		<dc:creator>Manuel</dc:creator>
		<pubDate>Fri, 23 Mar 2007 21:01:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/hotlink-protection-with-htaccess/#comment-35972</guid>
		<description>I think there is a problem with RSS images, isn't there?</description>
		<content:encoded><![CDATA[<p>I think there is a problem with RSS images, isn&#8217;t there?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
