<?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>dougv.com « Doug Vanderweide &#187; Apache</title>
	<atom:link href="http://www.dougv.com/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dougv.com</link>
	<description>ASP.NET, PHP, XML, JavaScript, Web geekery, Entrepreneurship</description>
	<lastBuildDate>Thu, 17 May 2012 22:33:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Correcting Permalinks After Moving Content From A Subdirectory To Root</title>
		<link>https://www.dougv.com/2011/02/15/correcting-permalinks-after-moving-content-from-a-subdirectory-to-root/</link>
		<comments>https://www.dougv.com/2011/02/15/correcting-permalinks-after-moving-content-from-a-subdirectory-to-root/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 14:18:59 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://dougv.com/?p=3577</guid>
		<description><![CDATA[Ran into this problem with the blog: As previously noted, I moved my WordPress install from a subdirectory to the root of my Web site. I tried the &#8220;Giving WordPress Its Own Directory&#8221; method, but I didn&#8217;t trust it, so I decided to go ahead with a physical move of the software to root. As [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2011/02/13/web-site-changes-new-theme-new-root/" rel="bookmark">Web Site Changes: New Theme, New Root</a> (17.2)</li>
				<li><a href="https://www.dougv.com/2009/02/21/moving-listitems-from-a-combobox-dropdownlist-to-a-listbox-in-net/" rel="bookmark">Moving ListItems From A ComboBox / DropDownList To A ListBox In .NET</a> (12.9)</li>
				<li><a href="https://www.dougv.com/2010/04/12/an-asp-net-system-to-allow-site-members-to-contribute-content-part-1-overview/" rel="bookmark">An ASP.NET System To Allow Site Members To Contribute Content, Part 1: Overview</a> (11.4)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>Ran into this problem with the blog:</p>
<p><a href="http://dougv.com/2011/02/13/web-site-changes-new-theme-new-root/">As previously noted</a>, I moved my WordPress install from a subdirectory to the root of my Web site. I tried the &#8220;<a href="http://http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory" target="_blank">Giving WordPress Its Own Directory</a>&#8221; method, but I didn&#8217;t trust it, so I decided to go ahead with a physical move of the software to root.</p>
<p>As a result, all permalinks to the 200+ articles in this blog became broken, since the subdirectory /blog/ was part of the permanent path root. This was bad, because Google has all those old links wrong, and so does my YOURLS install.</p>
<p>So, I needed a fix, stat. Thankfully, Apache has the mod_alias module, which does a better job of rewriting URLs from subdirectories to root directory than mod_rewrite does.</p>
<p>I specifically used the<a href="http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirectpermanent" target="_blank"> RewritePermanent</a> directive, which allows one to specify part of a URL string, and to where URLs containing that string should be directed. In my case, I wanted to direct all URLs that contained the  /blog/ subdirectory to the root of my site. Thus:</p>
<pre class="brush: bash; title: ; notranslate">&lt;IfModule mod_alias.c&gt;
RedirectPermanent /blog/ http://www.dougv.com/
&lt;/IfModule&gt;</pre>
<p>The first argument after RedirectPermanent is the part of the URL you want removed. The second argument is the URL to which you want found URLs redirected.</p>
<p>This works far better for me than the handful of <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" target="_blank">mod_rewrite</a> rules I tried to accomplish the same basic task.</p>
<p>Your Web server must have mod_alias installed for this to work. Most shared Web hosts will have installed mod_alias, but some might not, or might only enable it for selected domains, as a lot of rewrites and aliases can cause trouble with search engine rankings. Check with your Web service provider.</p>
<p>A hat tip to <a href="http://www.experts-exchange.com/Software/Server_Software/Web_Servers/Apache/Q_21746263.html" target="_blank">julianmatz at experts-exchange.com</a> for the tip. All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/correcting-permalinks-after-moving-content-from-a-subdirectory-to-root" target="_blank">http://www.delicious.com/dougvdotcom/correcting-permalinks-after-moving-content-from-a-subdirectory-to-root</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2011/02/13/web-site-changes-new-theme-new-root/" rel="bookmark">Web Site Changes: New Theme, New Root</a> (17.2)</li>
				<li><a href="https://www.dougv.com/2009/02/21/moving-listitems-from-a-combobox-dropdownlist-to-a-listbox-in-net/" rel="bookmark">Moving ListItems From A ComboBox / DropDownList To A ListBox In .NET</a> (12.9)</li>
				<li><a href="https://www.dougv.com/2010/04/12/an-asp-net-system-to-allow-site-members-to-contribute-content-part-1-overview/" rel="bookmark">An ASP.NET System To Allow Site Members To Contribute Content, Part 1: Overview</a> (11.4)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/apache/" title="Apache" rel="tag">Apache</a>, <a href="https://www.dougv.com/tag/blogging/" title="blogging" rel="tag">blogging</a>, <a href="https://www.dougv.com/tag/google/" title="Google" rel="tag">Google</a>, <a href="https://www.dougv.com/tag/rewrite/" title="rewrite" rel="tag">rewrite</a>, <a href="https://www.dougv.com/tag/seo/" title="SEO" rel="tag">SEO</a>, <a href="https://www.dougv.com/tag/web-server/" title="web server" rel="tag">web server</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2011/02/15/correcting-permalinks-after-moving-content-from-a-subdirectory-to-root/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom ErrorDocuments Available For Download</title>
		<link>https://www.dougv.com/2010/10/05/custom-errordocuments-available-for-download/</link>
		<comments>https://www.dougv.com/2010/10/05/custom-errordocuments-available-for-download/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 18:25:16 +0000</pubDate>
		<dc:creator>Doug Vanderweide</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://www.dougv.com/blog/?p=3369</guid>
		<description><![CDATA[After writing so much about the ASP.NET cryptographic padding oracle exploit, and the recommended workaround of a static error document, it dawned on me that I should probably make some custom error documents for my domains. And then I decided I should share them. So, if you&#8217;re so inclined, you can download the custom error [...]<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/04/23/idroid-andriod-os-port-for-iphone-2g-available-for-download-from-mediafire/" rel="bookmark">idroid Android OS Port For iPhone 2G Available For Download From MediaFire</a> (15.5)</li>
				<li><a href="https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/" rel="bookmark">Major Security Hole In ASP.NET Requires Error Redirect Workaround</a> (8.8)</li>
				<li><a href="https://www.dougv.com/2010/09/27/asp-net-crypto-exploit-patch-ships-tuesday-sept-28/" rel="bookmark">ASP.NET Crypto Exploit Patch Ships Tuesday, Sept. 28</a> (6.9)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.
	</div>
]]></description>
			<content:encoded><![CDATA[<p>After writing so much about the <a href="http://www.microsoft.com/technet/security/advisory/2416728.mspx" target="_blank">ASP.NET cryptographic padding oracle exploit</a>, and the <a href="http://weblogs.asp.net/scottgu/archive/2010/09/18/important-asp-net-security-vulnerability.aspx" target="_blank">recommended workaround</a> of a static error document, it dawned on me that I should probably make some custom error documents for my domains.</p>
<p>And then I decided I should share them. So, if you&#8217;re so inclined, you can <a href="http://www.dougv.com/wp-content/uploads/2010/10/error_docs.zip">download the custom error documents I use on this site</a>. I release all code under the latest version of the GNU GPL.</p>
<p>I&#8217;ve created pages for 401 (unauthorized), 403 (forbidden), 404 (not found) and 500 (internal server) HTTP errors. Here&#8217;s how they look <em>(click thumbnails for larger image)</em>:</p>
<p><a href="http://www.dougv.com/wp-content/uploads/2010/10/401.jpg"><img class="alignnone size-thumbnail wp-image-3378" title="ErrorDocument 401" src="http://www.dougv.com/wp-content/uploads/2010/10/401-150x112.jpg" alt="ErrorDocument 401" width="150" height="112" /></a> <a href="http://www.dougv.com/wp-content/uploads/2010/10/403.jpg"><img class="alignnone size-thumbnail wp-image-3379" title="ErrorDocument 403" src="http://www.dougv.com/wp-content/uploads/2010/10/403-150x112.jpg" alt="ErrorDocument 403" width="150" height="112" /></a> <a href="http://www.dougv.com/wp-content/uploads/2010/10/404.jpg"><img class="alignnone size-thumbnail wp-image-3380" title="ErrorDocument 404" src="http://www.dougv.com/wp-content/uploads/2010/10/404-150x112.jpg" alt="ErrorDocument 404" width="150" height="112" /></a> <a href="http://www.dougv.com/wp-content/uploads/2010/10/500.jpg"><img class="alignnone size-thumbnail wp-image-3381" title="ErrorDocument 500" src="http://www.dougv.com/wp-content/uploads/2010/10/500-150x112.jpg" alt="ErrorDocument 500" width="150" height="112" /></a></p>
<p>I designed these to be valid XHTML 1.0; to appear well in all screen resolutions from 1024 x 768 and greater; and to appear the same on most Web browsers. (Of course, I exclude Internet Explorer prior to version 7 from that list.)</p>
<p>This little exercise also gave me a chance to play with the <a href="http://code.google.com/apis/webfonts/" target="_blank">Google Font API</a>. There aren&#8217;t a lot of fonts available yet, but using the API couldn&#8217;t be simpler.</p>
<p>Instructions on implementing custom error document on Apache can be found <a href="http://www.htaccesselite.com/htaccess/htaccess-errordocument-examples-vt11.html" target="_blank">here</a>. Microsoft documents how to add customError files to your ASP.NET web.config file <a href="http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx" target="_blank">here</a>.</p>
<p>All links in this post on delicious: <a href="http://www.delicious.com/dougvdotcom/custom-errordocuments-available-for-download" target="_blank">http://www.delicious.com/dougvdotcom/custom-errordocuments-available-for-download</a></p>
<div class="yarpp">
	<h5>Related Posts</h5>
		<ol>
				<li><a href="https://www.dougv.com/2010/04/23/idroid-andriod-os-port-for-iphone-2g-available-for-download-from-mediafire/" rel="bookmark">idroid Android OS Port For iPhone 2G Available For Download From MediaFire</a> (15.5)</li>
				<li><a href="https://www.dougv.com/2010/09/18/major-security-hole-in-asp-net-requires-error-redirect-workaround/" rel="bookmark">Major Security Hole In ASP.NET Requires Error Redirect Workaround</a> (8.8)</li>
				<li><a href="https://www.dougv.com/2010/09/27/asp-net-crypto-exploit-patch-ships-tuesday-sept-28/" rel="bookmark">ASP.NET Crypto Exploit Patch Ships Tuesday, Sept. 28</a> (6.9)</li>
			</ol>
	<p class="note">The numbers inside parentheses are relevance scores. Scoring is based, in order of priority, on title, category, content and tags. The higher the score, the more likely that post relates to this post.</p>
	</div>

	Tags: <a href="https://www.dougv.com/tag/apache/" title="Apache" rel="tag">Apache</a>, <a href="https://www.dougv.com/tag/google/" title="Google" rel="tag">Google</a>, <a href="https://www.dougv.com/tag/iis/" title="IIS" rel="tag">IIS</a>, <a href="https://www.dougv.com/tag/microsoft/" title="Microsoft" rel="tag">Microsoft</a>, <a href="https://www.dougv.com/tag/msdn/" title="MSDN" rel="tag">MSDN</a>, <a href="https://www.dougv.com/tag/web-server/" title="web server" rel="tag">web server</a><br />
]]></content:encoded>
			<wfw:commentRss>https://www.dougv.com/2010/10/05/custom-errordocuments-available-for-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

