<?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>Techfun &#187; Weblogs</title>
	<atom:link href="http://blog.techfun.org/tag/weblogs/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.techfun.org</link>
	<description>Linux, Politics, Whatever...</description>
	<lastBuildDate>Sun, 13 Feb 2011 00:10:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>I Can See Your WordPress Butt</title>
		<link>http://blog.techfun.org/2009/05/i-can-see-your-wordpress-butt/</link>
		<comments>http://blog.techfun.org/2009/05/i-can-see-your-wordpress-butt/#comments</comments>
		<pubDate>Mon, 11 May 2009 20:38:22 +0000</pubDate>
		<dc:creator>JD Thomas</dc:creator>
				<category><![CDATA[Techfun]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[Google Search]]></category>
		<category><![CDATA[On the Web]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Weblogs]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WordPress.com]]></category>

		<guid isPermaLink="false">http://blog.techfun.org/?p=1807</guid>
		<description><![CDATA[Wordpress is a great blogging platform and its ease of use means its use has become very widely used by both blogging pros and amateurs alike.   If you are using Wordpress.com as your blogging platform this post does not apply to you, but if you have your own self-hosted installation of Wordpress you may want to read onward in order to see how your blog may be showing its backside like a patient in a cheap hospital gown.]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img zemanta-action-dragged" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignright">
<dt class="wp-caption-dt"><a href="http://www.flickr.com/photos/28694005@N07/2829286479"><img title="wordpress logo" src="http://farm4.static.flickr.com/3067/2829286479_4c45d4aeac_m.jpg" alt="wordpress logo" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image by <a href="http://www.flickr.com/photos/28694005@N07/2829286479">adria.richards</a> via Flickr</dd>
</dl>
</div>
</div>
<p><a href="http://www.wordpress.org">WordPress</a> is a great blogging platform and its ease of use means its use has become very widely used by both blogging pros and amateurs alike.   If you are using <a class="zem_slink" title="WordPress.com" rel="homepage" href="http://wordpress.com">WordPress.com</a> as your blogging platform this post does not apply to you, but if you have your own self-hosted installation of WordPress you may want to read onward in order to see how your blog may be showing its backside like a patient in a cheap hospital gown.</p>
<p>The many fine folks who contribute to the official releases of WordPress do a phenonmenal job of addressing security concerns as quickly as they pop up for the most part, and the stuff I am talking about here is not a security problem in terms of WordPress itself.</p>
<p>When you install WordPress for yourself the first step is unzipping the WordPress software and putting it in place on a webserver.  One of the folders you have uploaded is called <em><strong>wp-content</strong></em>.  This folder is home to your plugins, themes, and uploaded images by default.  WordPress includes a nice PHP page containing this:</p>
<p><code>&lt;?php<br />
 // Silence is golden.<br />
 ?&gt;</code><code> </code></p>
<p>What this does is present a simple blank page if someone browses to <em><strong>http://www.yourblog.com/wp-content</strong></em> and that is nice,  but we can do better.   The problem with this solution is that as you create folders under <strong>wp-content</strong> those folders are not protected in the same way.</p>
<p>As soon as you start uploading pictures for use in your blog posts your site will grow a whole tree of folders starting at <strong>/wp-content/uploads</strong>.  These folders are created as needed by your WordPress blog and will start with a year and then a month.  So all of your images used in posts in April of 2009 will be stored in <strong><em>http://www.yourblog.com/wp-content/uploads/2009/04</em>.</strong></p>
<p>Armed with this knowledge and the knowledge that many many webhosts out there will display a list of files and folders if you browse to a folder without an Index or Default page you can see exactly what content has been uploaded to a &#8220;unfixed&#8221; blog.  This is more of an annoyance than a security problem, but if your blog is heavy with high resoluton photograph this little problem allows vsitors in the know to rip down all your photos without ever needing to see the actual blog posts they belong with on the &#8220;front&#8221; side of your WordPress blog.  If you pay for bandwidth it could even get expensive.</p>
<p>If you would like to see exactly how widespread this problem is, click this <a title="Gogole Search for Indexes WP Image folders" href="http://www.google.com/#hl=en&amp;q=%22Index+of%22+wp-content%2Fuploads&amp;btnG=Google+Search&amp;aq=f&amp;oq=%22Index+of%22+wp-content%2Fuploads&amp;fp=NIRKy86ps1o" target="_blank">link to a Google Search</a> (should open in a new tab) that will show you your exposed backside looks to the Google indexing bots.  Currently Google sees about 148,000 of these.  If you would like to see if yours is one of them, just browse to <em><strong>http://www.yourblog.com/wp-content/uploads</strong></em>.  If you see a list of folders then you may benefit from this post.  If not, particularly if you get your blog&#8217;s homepage or a 404 error, you are in great shape!</p>
<p>There are many ways of addressing this problem for WordPress users who are experiencing it.  One way is through editing the main<em><strong> <a class="zem_slink" title=".htaccess" rel="wikipedia" href="http://en.wikipedia.org/wiki/.htaccess">.htaccess</a></strong></em> file in the root of your WordPress install, but I am of the firm opinion that most WordPress users should stay out of that file to avoid messing up their permalinks.   Instead, we will use a <em><strong>.htaccess</strong></em> solution that allows us to avoid touching the main file.</p>
<p>A dot htaccess file allows you to tell the webserver to behave differently for a folder and the folders underneath the folder where you upload the file.  If you are a Windows user, you may want to work on a file called htaccess.txt for this next part and rename it to<em><strong> .htaccess </strong></em>when its up on your server.</p>
<p>What we are going to do here is essentially sew the flap closed on the back of the WordPress hospital gown and direct people who try to look at your butt to another location.</p>
<p>We will do this with two lines of text.  Its that easy.</p>
<p><strong>Instructions</strong></p>
<ol>
<li>Open your favorite text editor and create a file called<em><strong> .htaccess</strong></em> (or htaccess.txt).</li>
<li>On the first line, enter:
<p><strong>Options -Indexes</strong></p>
</li>
<li>On the second line enter:<strong> </strong>
<p><strong>ErrorDocument 403 http://blog.techfun.org<br />
 </strong><br />
 Replace the http://blog.techfun.org to your blog&#8217;s homepage or Search or 404 page if you have one.</p>
</li>
<li>Save the file.</li>
<li>Upload the new<em><strong> .htaccess</strong></em> file to the wp-content folder on your site.  <em><strong>(Be Very Careful doing this to ensure you upload to the wp-content folder and not your root WordPress Folder.  The .htaccess file in the root has an important and special purpose in handling your custom permalinks and should not be overwritten.)</strong></em></li>
</ol>
<p>The first line tells the server use the option Indexes.  This tells the server not to generate a webpage listing files and folders in the absense of a true start page for that folder and its child folders.  This will cause the webserver to generate a 403 Error instead.  We all know a 404 Error means &#8220;resource not found&#8221; essentially.  The 403 Error means the viewer does not have permission to view the resource.  In this case, the resource is the directory listing of your <em><strong>wp-content</strong></em> folder and its subfolders.</p>
<p>That first line does the real work.  The second line tells the server what to do when issuing a 403 Error in that part of the WordPress site.  In my example, after the server issues the 403 Error it sends the visitor  to homepage of my blog.  This could be any URL or even a file on the server</p>
<p>If you would like to know more about the magic that is the .htaccess file, check out <a href="http://httpd.apache.org/docs/1.3/howto/htaccess.html">http://httpd.apache.org/docs/1.3/howto/htaccess.html</a></p>
<p>I&#8217;d like to thank<a href="http://www.twitter.com/tcwaters"> @tcwaters</a> &amp;<a href="http://www.twitter.com/ellejohara"> @ellejohara</a> on Twitter for encoruaging me to write this and <a href="http://www.twitter.com/geekmommashup">Heather Weaver</a> over at <a href="http://geekmommashup.com">GeekMomMashup.com</a> and <a href="http://bellatwilightshop.com/">BellaTwilightShop.com</a> for testing this process out before it went live on her HostGator account.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/96d2f323-9ff7-49f5-ae88-bdae78e84be4/"><img class="zemanta-pixie-img" style="border: medium none ; float: right;" src="http://img.zemanta.com/reblog_b.png?x-id=96d2f323-9ff7-49f5-ae88-bdae78e84be4" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><br />
<script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script><br />
</span></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.techfun.org/2009/05/i-can-see-your-wordpress-butt/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

