<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: &#8220;Hiding&#8221; WordPress installation files</title>
	<atom:link href="http://ox.no/posts/hiding-wordpress-installation-files/feed" rel="self" type="application/rss+xml" />
	<link>http://ox.no/posts/hiding-wordpress-installation-files</link>
	<description>Håvard Stranden's website</description>
	<lastBuildDate>Tue, 02 Mar 2010 07:41:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: WordPress Installation Techniques &#124; Guide for Blogs and Wordpress</title>
		<link>http://ox.no/posts/hiding-wordpress-installation-files/comment-page-1#comment-487</link>
		<dc:creator>WordPress Installation Techniques &#124; Guide for Blogs and Wordpress</dc:creator>
		<pubDate>Mon, 13 Oct 2008 06:02:52 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/hiding-wordpress-installation-files#comment-487</guid>
		<description>&lt;p&gt;[...] &#8220;Hiding&#8221; WordPress Installation Files (offsite) [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] &#8220;Hiding&#8221; WordPress Installation Files (offsite) [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: AskApache</title>
		<link>http://ox.no/posts/hiding-wordpress-installation-files/comment-page-1#comment-448</link>
		<dc:creator>AskApache</dc:creator>
		<pubDate>Tue, 29 Apr 2008 04:51:03 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/hiding-wordpress-installation-files#comment-448</guid>
		<description>&lt;p&gt;OH! Well then that makes perfect sense, I was reading too much into it.&lt;/p&gt;

&lt;p&gt;Sorry about posting a link to &lt;em&gt;[ad removed]&lt;/em&gt; in response to your suggestion I contact WP support for &quot;help&quot;.  Sorry for spamming your thread bro.&lt;/p&gt;

&lt;p&gt;~Out&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>OH! Well then that makes perfect sense, I was reading too much into it.</p>

<p>Sorry about posting a link to <em>[ad removed]</em> in response to your suggestion I contact WP support for &#8220;help&#8221;.  Sorry for spamming your thread bro.</p>

<p>~Out</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Håvard</title>
		<link>http://ox.no/posts/hiding-wordpress-installation-files/comment-page-1#comment-447</link>
		<dc:creator>Håvard</dc:creator>
		<pubDate>Sun, 27 Apr 2008 23:24:40 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/hiding-wordpress-installation-files#comment-447</guid>
		<description>&lt;p&gt;No. The article describes a technique for &quot;hiding&quot; your Wordpress installation from public access, which obviously requires a working Wordpress installation.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>No. The article describes a technique for &#8220;hiding&#8221; your Wordpress installation from public access, which obviously requires a working Wordpress installation.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: AskApache</title>
		<link>http://ox.no/posts/hiding-wordpress-installation-files/comment-page-1#comment-446</link>
		<dc:creator>AskApache</dc:creator>
		<pubDate>Sun, 27 Apr 2008 23:18:40 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/hiding-wordpress-installation-files#comment-446</guid>
		<description>&lt;p&gt;&lt;em&gt;Edit: Removed yet another ad from this guy    -H&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I&#039;m still not seeing what this actually does.  So you are saying that these rules should only be put in place BEFORE you actually install wordpress?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><em>Edit: Removed yet another ad from this guy    -H</em></p>

<p>I&#8217;m still not seeing what this actually does.  So you are saying that these rules should only be put in place BEFORE you actually install wordpress?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Håvard</title>
		<link>http://ox.no/posts/hiding-wordpress-installation-files/comment-page-1#comment-442</link>
		<dc:creator>Håvard</dc:creator>
		<pubDate>Sun, 27 Apr 2008 13:08:50 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/hiding-wordpress-installation-files#comment-442</guid>
		<description>&lt;p&gt;AskApache: What the article does is to add a few lines before &lt;em&gt;the default Wordpress rewrite rules&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;The added lines state that if the request is for a file in the wordpress directory (which can/must be changed if the directory does not match your installation), and the referer is not the site (which can/must also be changed to match your installation), then the request is redirected to the root of the site (which can/must also be changed to match your preference and installation). &lt;/p&gt;

&lt;p&gt;The remaining ruleset is &lt;em&gt;the Wordpress default&lt;/em&gt;, which is the same in any Wordpress installation which manages &lt;code&gt;.htaccess&lt;/code&gt;. Reading the ruleset, you can see that it lets each request through for handling by index.php, unless the request is for an actual directory or file. I suggest you read the Wordpress documentation on permalinks and read the parts of Wordpress that handle permalinks (i.e. index.php and referred functions) for a detailed explanation. &lt;/p&gt;

&lt;p&gt;If you have issues with the default ruleset, I suggest you contact the Wordpress development team.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>AskApache: What the article does is to add a few lines before <em>the default Wordpress rewrite rules</em>. </p>

<p>The added lines state that if the request is for a file in the wordpress directory (which can/must be changed if the directory does not match your installation), and the referer is not the site (which can/must also be changed to match your installation), then the request is redirected to the root of the site (which can/must also be changed to match your preference and installation). </p>

<p>The remaining ruleset is <em>the Wordpress default</em>, which is the same in any Wordpress installation which manages <code>.htaccess</code>. Reading the ruleset, you can see that it lets each request through for handling by index.php, unless the request is for an actual directory or file. I suggest you read the Wordpress documentation on permalinks and read the parts of Wordpress that handle permalinks (i.e. index.php and referred functions) for a detailed explanation. </p>

<p>If you have issues with the default ruleset, I suggest you contact the Wordpress development team.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: AskApache</title>
		<link>http://ox.no/posts/hiding-wordpress-installation-files/comment-page-1#comment-441</link>
		<dc:creator>AskApache</dc:creator>
		<pubDate>Sat, 26 Apr 2008 17:03:16 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/hiding-wordpress-installation-files#comment-441</guid>
		<description>&lt;p&gt;Havard,&lt;/p&gt;

&lt;p&gt;Ya interesting discussion.  I would like for you to explain where I was incorrect in my assessment of the negative SEO aspect.  Let me simplify my objections so you can better explain.&lt;/p&gt;

&lt;p&gt;Basically, Googlebot finds a link to &lt;a&gt;Hiding wordpress installation files&lt;/a&gt; in the comments section of the &lt;a&gt;AskApache Password Protect&lt;/a&gt; plugin page, so then Googlebot, which has to act in accordance with the RFC HTTP client specifications just like any user-agent/browser, makes a GET request for this page with the referral header being set as the askapache.com plugin page.&lt;/p&gt;

&lt;p&gt;If I understand, this code would then issue a 301 Permanent redirect to Googlebot instructing it to go to your blogs home page instead.  When Googlebot or other search engine robots receive a 301 permanent redirect they usually take the redirecting URL OUT of their search index.&lt;/p&gt;

&lt;p&gt;But once googlebot was on your homepage, any links to your site that it followed from there  WOULD be allowed because googlebot would then set the referall header to your site.&lt;/p&gt;

&lt;p&gt;When Googlebot receives a 301 redirect like this, it actually transfers some of the &lt;a&gt;page-rank&lt;/a&gt; associated with the page issusing the redirect, to the page it is being redirected to.  So this could actually boost the page-rank of your home-page, its a tricky thing.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Havard,</p>

<p>Ya interesting discussion.  I would like for you to explain where I was incorrect in my assessment of the negative SEO aspect.  Let me simplify my objections so you can better explain.</p>

<p>Basically, Googlebot finds a link to <a>Hiding wordpress installation files</a> in the comments section of the <a>AskApache Password Protect</a> plugin page, so then Googlebot, which has to act in accordance with the RFC HTTP client specifications just like any user-agent/browser, makes a GET request for this page with the referral header being set as the askapache.com plugin page.</p>

<p>If I understand, this code would then issue a 301 Permanent redirect to Googlebot instructing it to go to your blogs home page instead.  When Googlebot or other search engine robots receive a 301 permanent redirect they usually take the redirecting URL OUT of their search index.</p>

<p>But once googlebot was on your homepage, any links to your site that it followed from there  WOULD be allowed because googlebot would then set the referall header to your site.</p>

<p>When Googlebot receives a 301 redirect like this, it actually transfers some of the <a>page-rank</a> associated with the page issusing the redirect, to the page it is being redirected to.  So this could actually boost the page-rank of your home-page, its a tricky thing.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Håvard</title>
		<link>http://ox.no/posts/hiding-wordpress-installation-files/comment-page-1#comment-432</link>
		<dc:creator>Håvard</dc:creator>
		<pubDate>Mon, 21 Apr 2008 07:56:12 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/hiding-wordpress-installation-files#comment-432</guid>
		<description>&lt;p&gt;&lt;&lt;/p&gt;

&lt;p&gt;p&gt;&lt;/p&gt;

&lt;p&gt;AskApache: Again, your claim that the &quot;hiding&quot; technique has negative effects on SEO are false. The article simply extends the Wordpress rewrite rules.&lt;/p&gt;

&lt;p&gt;Other than that, your reasoning about the article is mostly correct.&lt;/p&gt;

&lt;p&gt;Your reasoning about the security challenges with your own plugin, however, are faulty. If someone wants to bypass HTTP Basic authentication over an insecure transport, they will be able to do so. Without a secure transport, the authentication cannot be trusted.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>&lt;</p>

<p>p></p>

<p>AskApache: Again, your claim that the &#8220;hiding&#8221; technique has negative effects on SEO are false. The article simply extends the Wordpress rewrite rules.</p>

<p>Other than that, your reasoning about the article is mostly correct.</p>

<p>Your reasoning about the security challenges with your own plugin, however, are faulty. If someone wants to bypass HTTP Basic authentication over an insecure transport, they will be able to do so. Without a secure transport, the authentication cannot be trusted.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: AskApache</title>
		<link>http://ox.no/posts/hiding-wordpress-installation-files/comment-page-1#comment-431</link>
		<dc:creator>AskApache</dc:creator>
		<pubDate>Mon, 21 Apr 2008 01:56:11 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/hiding-wordpress-installation-files#comment-431</guid>
		<description>&lt;p&gt;&lt;strong&gt;WP-Plugin: AskApache Password Protect...&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AskApache Password Protect adds some serious password protection to your WordPress Blog&#8217;s admin directory.  Imagine a HUGE brick wall protecting your frail .php scripts from the endless attacks of automated web robots and password-guessing exploi...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><strong>WP-Plugin: AskApache Password Protect&#8230;</strong></p>

<p>AskApache Password Protect adds some serious password protection to your WordPress Blog&#8217;s admin directory.  Imagine a HUGE brick wall protecting your frail .php scripts from the endless attacks of automated web robots and password-guessing exploi&#8230;</p>]]></content:encoded>
	</item>
	<item>
		<title>By: AskApache</title>
		<link>http://ox.no/posts/hiding-wordpress-installation-files/comment-page-1#comment-429</link>
		<dc:creator>AskApache</dc:creator>
		<pubDate>Mon, 21 Apr 2008 01:46:12 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/hiding-wordpress-installation-files#comment-429</guid>
		<description>&lt;blockquote&gt;HTTP Basic authentication, which itself is not a security measure, and relies on a secure connection, such as TLS, to achieve secure authentication&lt;/blockquote&gt;

&lt;p&gt;Yes that is the most common argument against it, though its really a non-issue for 99% of sites.  For an attacker to bypass the HTTP authentication on a non-encrypted connection, they would literally have to have a physical connection to a network path between an authenticated user and the server.  The only issue is that the password and username are passed in cleartext, but you would have to be able to sniff the data off the wire to bypass it.  As you can imagine, most of the automated exploit tools and bots performing mass exploits against WordPress blogs and other online software do not have this capability, so they are stopped dead.  For sites that I admin that require a bit more security, I completely agree with you that SSL is mandatory, which encryts the connection and thereby prevents an attacker with physical access who can sniff your connection from seeing the password pass in plaintext.  That can be a very secure setup.&lt;/p&gt;

&lt;p&gt;Your logic and solutions to this problem are completely accurate and insightful, as you say here:&lt;/p&gt;

&lt;blockquote&gt;If it is for a file or a directory, then Apache handles it (it falls through all the rewriting rules). This means that Apache will serve any file or directory as long as it can be read, which of course includes the WordPress installation files....  The desired situation is that people should only be able to read this files through “indirect” requests from your website, and not by accessing them directly.&lt;/blockquote&gt;

&lt;p&gt;The problem is accomplishing that by using the HTTP_REFERER header is simply impossible and ineffective.  And of course the biggest problem for most blog admins would be the overwhelmingly negative effects on SEO.&lt;/p&gt;

&lt;p&gt;Apache&#039;s mod&lt;em&gt;rewrite module only has 1 variable that can achieve your solution effectively, which is what the AskApache Password Protect plugin utilizes.  Basically, the special variable THE&lt;/em&gt;REQUEST contains the FULL HTTP request sent by the client, in fact, the internall operation of the server rely almost exclusively on this variable to determine the values of other variables, like the QUERY&lt;em&gt;STRING, PROTOCOL, REQUEST&lt;/em&gt;METHOD, etc..   THE_REQUEST looks like this.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&quot;GET /wordpress/wp-content/plugins/ HTTP/1.1&quot;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The reason this plugin is so special is because this is the only time the request is unfiltered.  Basically ONLY external requests like clicking on a link or typing a link in a browser will cause this value.  Other than using the REDIRECT_STATUS variable for those using cgi, this is the only way to determine whether a request is direct or indirect.&lt;/p&gt;

&lt;p&gt;To take it further, I&#039;ve removed directory index generation and using the DirectoryIndex command to point to a static file we can make sure that directories can&#039;t be browsed.  I&#039;ve also used the NS or nosubrequest flag to make sure internal uri requests by apache and other modules are able to pass through.  I would encourage you to try accessing files at askapache.com if you would like a demonstration.&lt;/p&gt;

&lt;p&gt;Options -Indexes
DirectoryIndex /wordpress/index.php&lt;/p&gt;

&lt;p&gt;ErrorDocument 403 /forbidden.html&lt;/p&gt;

&lt;p&gt;RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /wordpress/wp-(includes&#124;admin&#124;content)/?.* [NC]
RewriteCond %{REQUEST_FILENAME} ^.+&#46;php$ [NC]
RewriteRule .* - [F, NS]&lt;/p&gt;

&lt;p&gt;I just noticed you wrote this a couple years ago, which is before I heard of this technique.  This is just to add to your excellent article, as its a great idea and one of the better and easier ways to really increase your security.  Subscribed!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote>HTTP Basic authentication, which itself is not a security measure, and relies on a secure connection, such as TLS, to achieve secure authentication</blockquote>

<p>Yes that is the most common argument against it, though its really a non-issue for 99% of sites.  For an attacker to bypass the HTTP authentication on a non-encrypted connection, they would literally have to have a physical connection to a network path between an authenticated user and the server.  The only issue is that the password and username are passed in cleartext, but you would have to be able to sniff the data off the wire to bypass it.  As you can imagine, most of the automated exploit tools and bots performing mass exploits against WordPress blogs and other online software do not have this capability, so they are stopped dead.  For sites that I admin that require a bit more security, I completely agree with you that SSL is mandatory, which encryts the connection and thereby prevents an attacker with physical access who can sniff your connection from seeing the password pass in plaintext.  That can be a very secure setup.</p>

<p>Your logic and solutions to this problem are completely accurate and insightful, as you say here:</p>

<blockquote>If it is for a file or a directory, then Apache handles it (it falls through all the rewriting rules). This means that Apache will serve any file or directory as long as it can be read, which of course includes the WordPress installation files&#8230;.  The desired situation is that people should only be able to read this files through “indirect” requests from your website, and not by accessing them directly.</blockquote>

<p>The problem is accomplishing that by using the HTTP_REFERER header is simply impossible and ineffective.  And of course the biggest problem for most blog admins would be the overwhelmingly negative effects on SEO.</p>

<p>Apache&#8217;s mod<em>rewrite module only has 1 variable that can achieve your solution effectively, which is what the AskApache Password Protect plugin utilizes.  Basically, the special variable THE</em>REQUEST contains the FULL HTTP request sent by the client, in fact, the internall operation of the server rely almost exclusively on this variable to determine the values of other variables, like the QUERY<em>STRING, PROTOCOL, REQUEST</em>METHOD, etc..   THE_REQUEST looks like this.</p>

<p><code>"GET /wordpress/wp-content/plugins/ HTTP/1.1"</code></p>

<p>The reason this plugin is so special is because this is the only time the request is unfiltered.  Basically ONLY external requests like clicking on a link or typing a link in a browser will cause this value.  Other than using the REDIRECT_STATUS variable for those using cgi, this is the only way to determine whether a request is direct or indirect.</p>

<p>To take it further, I&#8217;ve removed directory index generation and using the DirectoryIndex command to point to a static file we can make sure that directories can&#8217;t be browsed.  I&#8217;ve also used the NS or nosubrequest flag to make sure internal uri requests by apache and other modules are able to pass through.  I would encourage you to try accessing files at askapache.com if you would like a demonstration.</p>

<p>Options -Indexes
DirectoryIndex /wordpress/index.php</p>

<p>ErrorDocument 403 /forbidden.html</p>

<p>RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /wordpress/wp-(includes|admin|content)/?.* [NC]
RewriteCond %{REQUEST_FILENAME} ^.+&#46;php$ [NC]
RewriteRule .* &#8211; [F, NS]</p>

<p>I just noticed you wrote this a couple years ago, which is before I heard of this technique.  This is just to add to your excellent article, as its a great idea and one of the better and easier ways to really increase your security.  Subscribed!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Håvard</title>
		<link>http://ox.no/posts/hiding-wordpress-installation-files/comment-page-1#comment-428</link>
		<dc:creator>Håvard</dc:creator>
		<pubDate>Sat, 19 Apr 2008 11:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/hiding-wordpress-installation-files#comment-428</guid>
		<description>&lt;p&gt;AskApache: You&#039;re not reading the post correctly. The wordpress installation referred to in the post is in a directory of it&#039;s own, which eliminates the problem you first mention.&lt;/p&gt;

&lt;p&gt;The spoofing of referrer headers you mention is true, and the post also discusses this issue.&lt;/p&gt;

&lt;p&gt;The Wordpress installation files that the post refers to consists of all files installed when you install Wordpress, which includes both the &lt;code&gt;wp-admin&lt;/code&gt; folder, and the other folders you mention.&lt;/p&gt;

&lt;p&gt;I fail to see how your supplied .htaccess file works. As far as I can tell, this will deny any request for files below &lt;code&gt;wp-includes&lt;/code&gt; and &lt;code&gt;wp-content&lt;/code&gt; which are not PHP files. Please correct me if I&#039;m wrong.&lt;/p&gt;

&lt;p&gt;Your AskApache plugin solves a different problem, namely authenticating through HTTP Basic authentication, which itself is not a security measure, and relies on a secure connection, such as TLS, to achieve secure authentication (see &lt;a href=&quot;http://en.wikipedia.org/wiki/Basic_access_authentication&quot; rel=&quot;nofollow&quot;&gt;Wikipedia&lt;/a&gt; for a basic introduction).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>AskApache: You&#8217;re not reading the post correctly. The wordpress installation referred to in the post is in a directory of it&#8217;s own, which eliminates the problem you first mention.</p>

<p>The spoofing of referrer headers you mention is true, and the post also discusses this issue.</p>

<p>The Wordpress installation files that the post refers to consists of all files installed when you install Wordpress, which includes both the <code>wp-admin</code> folder, and the other folders you mention.</p>

<p>I fail to see how your supplied .htaccess file works. As far as I can tell, this will deny any request for files below <code>wp-includes</code> and <code>wp-content</code> which are not PHP files. Please correct me if I&#8217;m wrong.</p>

<p>Your AskApache plugin solves a different problem, namely authenticating through HTTP Basic authentication, which itself is not a security measure, and relies on a secure connection, such as TLS, to achieve secure authentication (see <a href="http://en.wikipedia.org/wiki/Basic_access_authentication" rel="nofollow">Wikipedia</a> for a basic introduction).</p>]]></content:encoded>
	</item>
</channel>
</rss>
