<?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: Detecting WordPress login via htaccess</title>
	<atom:link href="http://sltaylor.co.uk/blog/detecting-wordpress-login-via-htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://sltaylor.co.uk/blog/detecting-wordpress-login-via-htaccess/</link>
	<description>Freelance WordPress developer in London - XHTML, CSS &#38; design</description>
	<lastBuildDate>Sat, 25 Feb 2012 11:45:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Steve Taylor</title>
		<link>http://sltaylor.co.uk/blog/detecting-wordpress-login-via-htaccess/#comment-18822</link>
		<dc:creator>Steve Taylor</dc:creator>
		<pubDate>Fri, 06 May 2011 15:43:26 +0000</pubDate>
		<guid isPermaLink="false">http://sltaylor.co.uk/?p=154#comment-18822</guid>
		<description>OK... well I guess you could just hard-code that. But then it would be pretty easy to get past. OK, a bit harder than the above, but it&#039;s still not really doing authentication or authorisation. I guess you could come up with something that actually modifies .htaccess dynamically with even more detailed login data every time someone logs in, but that could get hairy. Keep me posted if you come up with anything more elegant!</description>
		<content:encoded><![CDATA[<p>OK&#8230; well I guess you could just hard-code that. But then it would be pretty easy to get past. OK, a bit harder than the above, but it&#8217;s still not really doing authentication or authorisation. I guess you could come up with something that actually modifies .htaccess dynamically with even more detailed login data every time someone logs in, but that could get hairy. Keep me posted if you come up with anything more elegant!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan Rice</title>
		<link>http://sltaylor.co.uk/blog/detecting-wordpress-login-via-htaccess/#comment-18821</link>
		<dc:creator>Nathan Rice</dc:creator>
		<pubDate>Fri, 06 May 2011 15:30:07 +0000</pubDate>
		<guid isPermaLink="false">http://sltaylor.co.uk/?p=154#comment-18821</guid>
		<description>No, it doesn&#039;t, as far as I can tell.

However, a plugin for WP could be written to add this bit to .htaccess. If you did that, then passing PHP values to .htaccess would be no problem.

I&#039;m sure there&#039;s a hook that fires after the rewrite rules get flushed, triggering WP to create/edit the .htaccess file. That would be the best point to insert the extra stuff.

The &lt;a href=&quot;http://xref.yoast.com/trunk/wp-admin/includes/misc.php.source.html#l53&quot;&gt;insert_with_markers()&lt;/a&gt; function would be very helpful.</description>
		<content:encoded><![CDATA[<p>No, it doesn&#8217;t, as far as I can tell.</p>
<p>However, a plugin for WP could be written to add this bit to .htaccess. If you did that, then passing PHP values to .htaccess would be no problem.</p>
<p>I&#8217;m sure there&#8217;s a hook that fires after the rewrite rules get flushed, triggering WP to create/edit the .htaccess file. That would be the best point to insert the extra stuff.</p>
<p>The <a href="http://xref.yoast.com/trunk/wp-admin/includes/misc.php.source.html#l53">insert_with_markers()</a> function would be very helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Taylor</title>
		<link>http://sltaylor.co.uk/blog/detecting-wordpress-login-via-htaccess/#comment-18820</link>
		<dc:creator>Steve Taylor</dc:creator>
		<pubDate>Fri, 06 May 2011 15:23:08 +0000</pubDate>
		<guid isPermaLink="false">http://sltaylor.co.uk/?p=154#comment-18820</guid>
		<description>Thanks for the info Nathan - but I&#039;m presuming there&#039;s no way to access these values in .htaccess? That&#039;s the nub of the above technique. Even if you can hardcode the site URL, does Apache provide an MD5 function in its directives?</description>
		<content:encoded><![CDATA[<p>Thanks for the info Nathan &#8211; but I&#8217;m presuming there&#8217;s no way to access these values in .htaccess? That&#8217;s the nub of the above technique. Even if you can hardcode the site URL, does Apache provide an MD5 function in its directives?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan Rice</title>
		<link>http://sltaylor.co.uk/blog/detecting-wordpress-login-via-htaccess/#comment-18819</link>
		<dc:creator>Nathan Rice</dc:creator>
		<pubDate>Fri, 06 May 2011 15:20:16 +0000</pubDate>
		<guid isPermaLink="false">http://sltaylor.co.uk/?p=154#comment-18819</guid>
		<description>The random characters at the end of the cookie key are the md5 hash of whatever your site URL is. You can access that by doing this, in PHP:

md5( get_site_option( &#039;siteurl&#039; ) );

Or access what WP calculates (a bit safer) by the constant, COOKIEHASH.

And the whole string can be accessed via the constant, LOGGED_IN_COOKIE, which WP also defines.</description>
		<content:encoded><![CDATA[<p>The random characters at the end of the cookie key are the md5 hash of whatever your site URL is. You can access that by doing this, in PHP:</p>
<p>md5( get_site_option( &#8216;siteurl&#8217; ) );</p>
<p>Or access what WP calculates (a bit safer) by the constant, COOKIEHASH.</p>
<p>And the whole string can be accessed via the constant, LOGGED_IN_COOKIE, which WP also defines.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- This Quick Cache file was built for (  sltaylor.co.uk/blog/detecting-wordpress-login-via-htaccess/feed/ ) in 0.23494 seconds, on May 17th, 2012 at 1:44 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on May 17th, 2012 at 2:44 pm UTC -->
