<?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>TechnologyInsanity.com &#187; password</title>
	<atom:link href="http://technologyinsanity.com/tag/password/feed/" rel="self" type="application/rss+xml" />
	<link>http://technologyinsanity.com</link>
	<description></description>
	<lastBuildDate>Wed, 19 Jan 2011 19:11:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Switching to permalinks</title>
		<link>http://technologyinsanity.com/tutorials/switching-to-permalinks/</link>
		<comments>http://technologyinsanity.com/tutorials/switching-to-permalinks/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 22:18:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[directory]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[permalinks]]></category>
		<category><![CDATA[protected]]></category>
		<category><![CDATA[stats]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://technologyinsanity.com/?p=656</guid>
		<description><![CDATA[If you haven&#8217;t already, you should really switch to permalinks. /?p= is an unfriendly, unSEO link. Go to your settings &#8211;&#62; Permalink and set custom like this /%category%/%postname%/ Okay, so at first glance that seems easy enough right? Well yeah.. Not so much. First of all, I had to enable mod_rewrite in apache. (Remember I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t already, you should really switch to permalinks. /?p= is an unfriendly, unSEO link. Go to your settings &#8211;&gt; Permalink and set custom like this /%category%/%postname%/</p>
<p>Okay, so at first glance that seems easy enough right? Well yeah.. Not so much. First of all, I had to enable mod_rewrite in apache. (Remember I&#8217;m on a VPS) That wasn&#8217;t difficult, you just use the command a2enmod on Ubuntu/Debian systems. Now with that done, I could use the .htaccess file generated by WordPress to serve up the new fancy URLs. Wait.. My old /?p= are not being forwarded to the new fancy urls. Well, a simple plugin called Permalink Redirect solves that issue.</p>
<p>Now comes the real fun. Everytime I go to try and access my stats, I get a 404. The stats folder is clearly there, but I cannot access it. So, I remove the .htaccess on that folder. I can now access it, but it&#8217;s no longer password protected <img src='http://technologyinsanity.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  I really wasn&#8217;t sure if this was caused by ISPConfig or the .htaccess.</p>
<p>So I searched around for quite some time. The solution is simple, when you go to a password protected area it looks for the 401 and 403 error files first, before giving you a login prompt. With the new rewrite in place, all the errors are now on the WordPress theme. It doesn&#8217;t have these errors, so the resulting error is 404 not found.</p>
<p>Anyway, how do you fix this issue? Simple, add the following lines to your .htaccess file in the root directory.</p>
<p><code>ErrorDocument 401 /[path_to_file]/myerror.html</code></p>
<p><code>ErrorDocument 403 /[path_to_file]/myerror.html</code></p>
<p>That&#8217;s it! Problem solved. I can now access my stats directory with the password, and permalinks are working.</p>
<p><strong>Forum</strong></p>
<p><a href="http://technologyinsanity.com/forum/viewtopic.php?f=18&amp;t=39">Discussion</a></p>
]]></content:encoded>
			<wfw:commentRss>http://technologyinsanity.com/tutorials/switching-to-permalinks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

