<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>JaypeeOnline &#187; htaccess disable hotlinking</title> <atom:link href="http://jaypeeonline.net/tag/htaccess-disable-hotlinking/feed/" rel="self" type="application/rss+xml" /><link>http://jaypeeonline.net</link> <description>Technology, Blogging News, WordPress Theme and Plugin Reviews, Tips and Tricks</description> <lastBuildDate>Mon, 21 May 2012 03:17:06 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <item><title>HowTo: Allow Google Reader Access To Hotlink-Protected Images</title><link>http://jaypeeonline.net/tips-tricks/howto-allow-google-reader-access-to-hotlink-protected-images/</link> <comments>http://jaypeeonline.net/tips-tricks/howto-allow-google-reader-access-to-hotlink-protected-images/#comments</comments> <pubDate>Mon, 27 Apr 2009 16:50:26 +0000</pubDate> <dc:creator>Jaypee Habaradas</dc:creator> <category><![CDATA[Tips and Tricks]]></category> <category><![CDATA[disable hotlinking]]></category> <category><![CDATA[google-reader]]></category> <category><![CDATA[hotlink protection]]></category> <category><![CDATA[hotlinking]]></category> <category><![CDATA[htaccess disable hotlinking]]></category> <category><![CDATA[htaccess hotlink protection]]></category><guid
isPermaLink="false">http://jaypeeonline.net/?p=4363</guid> <description><![CDATA[I got an email last week from one of my readers, Noel Perlas informing me that JaypeeOnline&#8217;s post images weren&#8217;t being displayed or were missing in Google Reader. I wasn&#8217;t aware of this problem because I don&#8217;t check my blog&#8217;s RSS feeds and I haven&#8217;t received any complaints from other readers prior to that. Anyways, [...]]]></description> <content:encoded><![CDATA[<p>I got an email last week from one of my readers, <a
href="http://noelperlas.com/">Noel Perlas</a> informing me that JaypeeOnline&#8217;s post images weren&#8217;t being displayed or were missing in <strong>Google Reader</strong>. I wasn&#8217;t aware of this problem because I don&#8217;t check my blog&#8217;s RSS feeds and I haven&#8217;t received any complaints from other readers prior to that.</p><p>Anyways, I went ahead and checked it myself with Google Reader and indeed, the post images from JaypeeOnline&#8217;s RSS feed were missing and the only thing I could see is the image alt attribute.</p><p><strong>Google Reader showing image alt attribute</strong><br
/> <img
src="http://maxcdn.jaypeeonline.net/images/google_reader_noimage.png" alt="Google Reader Not Showing Blog Post Image" /></p><p>I did some research and I found out that Google Reader can&#8217;t access images from blogs that have enabled hotlink protection. For those who don&#8217;t know, I&#8217;ve disabled hotlinking to all my images using <strong>.htaccess rules</strong> which I discussed on an earlier post entitled &#8211; <a
href="http://jaypeeonline.net/tips-tricks/howto-prevent-bandwidth-theft-or-hotlinking/">How To: Prevent Bandwidth Theft or Hotlinking</a>. After editing my .htaccess file and adding a couple more rules to allow Google Reader access to my images, the post images now show up on Google Reader.</p><p><strong>Google Reader showing blog post image</strong><br
/> <img
src="http://maxcdn.jaypeeonline.net/images/google_reader.png" alt="Google Reader Showing Blog Post Image" /></p><p>If you have the same problem with Google Reader not displaying your blog&#8217;s post images and have <strong>disabled hotlinking via .htaccess</strong>, just follow this short and simple tutorial.</p><p><strong>NOTE:</strong> Make sure you <strong>back up your existing .htaccess file</strong> before you do any modifications. In case something goes wrong, you can always revert to the original file.</p><p>The following is the basic code or <strong>.htaccess rule</strong> to disable hotlinking or protect images from hotlinking:</p><pre>
# Disable Hotlinking
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com/ [NC]
RewriteRule .*.(jpeg|jpg|gif|png)$ - [F]
</pre><p><br/></p><p><strong>NOTE</strong>: Replace <strong>?domain.com/</strong> with your own blog URL.</p><p>The following code/htaccess rule is the one that will allow  Google Reader access to the hotlink-protected images from your server. If you noticed, there are two lines. The first line is for the regular <strong>Google Reader</strong> and the second one is for <strong>Google Reader Mobile</strong> just in case you have readers who use that.</p><pre>
RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/view/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/m/view/.*$ [NC]
</pre><p><br/></p><p>Now, combine the previous code to basic <strong>disable hotlinking code</strong> and you should have this:</p><pre>
# Disable Hotlinking
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.|images\.)?google\.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/view/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/m/view/.*$ [NC]
RewriteRule \.(jpeg|jpg|gif|png)$ - [F]
</pre><p><br/></p><p>Copy and paste the code to your <strong>.htaccess</strong> file, save it and upload it back to your web server. That should fix the issue and solve your problem with Google Reader not displaying your blog post images.</p><p>To my readers who use <strong>Google Reader</strong> to get updates from JaypeeOnline, I apologize if you guys weren&#8217;t seeing the images included in each blog post these past few weeks/months. I wasn&#8217;t aware that there was this issue with Google Reader. I would appreciate it if you guys can let me know if you experience any issues or problems with JaypeeOnline&#8217;s RSS feed on Google Reader or other news aggregator sites or apps.</p><p>Btw, thank you Noel for letting me know about this! I wouldn&#8217;t have known there was a problem if you haven&#8217;t told me about it. I really appreciate it.</p><p>Has anyone else had the same problem with Google Reader? What did you do to solve the problem? Was this tutorial helpful? Please share your thoughts via the comment section. Thank you and have a nice day!</p><div
id="crp_related"><ul><li><a
href="http://jaypeeonline.net/tips-tricks/howto-prevent-bandwidth-theft-or-hotlinking/" rel="bookmark" class="crp_title">HowTo: Prevent Bandwidth Theft or Hotlinking</a></li><li><a
href="http://jaypeeonline.net/blog/why-i-switched-to-google-reader/" rel="bookmark" class="crp_title">Why I Switched To Google Reader</a></li><li><a
href="http://jaypeeonline.net/firefox/helvetireader/" rel="bookmark" class="crp_title">Helvetireader &#8211; Clean, Minimalist Google Reader Interface</a></li><li><a
href="http://jaypeeonline.net/wordpress-plugins/wp-plugin-review-google-syntax-highlighter/" rel="bookmark" class="crp_title">WP Plugin Review: Google Syntax Highlighter</a></li><li><a
href="http://jaypeeonline.net/blog/google-feedfetcher-had-a-hangover/" rel="bookmark" class="crp_title">Google Feedfetcher Had A Hangover</a></li><li><a
href="http://jaypeeonline.net/gadgets/asus-color-e-reader/" rel="bookmark" class="crp_title">Asus Color E-Reader</a></li><li><a
href="http://jaypeeonline.net/freeware/feeddemon-and-netnewswire-now-free/" rel="bookmark" class="crp_title">FeedDemon and NetNewsWire now FREE!</a></li><li><a
href="http://jaypeeonline.net/gadgets/barnes-noble-nook-ereader/" rel="bookmark" class="crp_title">Barnes &#038; Noble Unveil Nook E-Reader</a></li><li><a
href="http://jaypeeonline.net/firefox/feedly-magazine-style-homepage/" rel="bookmark" class="crp_title">Feedly: Magazine Style Homepage</a></li><li><a
href="http://jaypeeonline.net/internet/google-browser-size-tool/" rel="bookmark" class="crp_title">Google Browser Size Tool</a></li></ul></div>]]></content:encoded> <wfw:commentRss>http://jaypeeonline.net/tips-tricks/howto-allow-google-reader-access-to-hotlink-protected-images/feed/</wfw:commentRss> <slash:comments>22</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (User agent is rejected)
Database Caching 2/29 queries in 0.090 seconds using disk
Object Caching 526/575 objects using disk
Content Delivery Network via maxcdn.jaypeeonline.net

Served from: jaypeeonline.net @ 2012-05-26 10:43:49 -->
