<?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>Darren Krape &#187; Wordpress mu</title>
	<atom:link href="http://www.darrenkrape.com/tag/wordpress-mu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.darrenkrape.com</link>
	<description>- web design and life stuff</description>
	<lastBuildDate>Mon, 16 Aug 2010 01:34:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Redirecting blog URLs in Wordpress MU using .htaccess and mod_rewrite</title>
		<link>http://www.darrenkrape.com/categories/design-and-development/redirecting-wordpress-mu-using-htaccess/</link>
		<comments>http://www.darrenkrape.com/categories/design-and-development/redirecting-wordpress-mu-using-htaccess/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 21:43:56 +0000</pubDate>
		<dc:creator>Darren</dc:creator>
				<category><![CDATA[Design and Development]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress mu]]></category>

		<guid isPermaLink="false">http://www.darrenkrape.com/?p=190</guid>
		<description><![CDATA[Recently, one of the blogs I help support wanted to change its name and location. This meant changing the virtual directory name in the URL as well. Typically, simply changing the directory name in the WordPress settings would break all incoming links, something we definitely wanted to avoid.
Fortunately, it is very easy to change the [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, <a href="http://blogs.america.gov/obama/">one of the blogs</a> I help support wanted to change its name and location. This meant changing the virtual directory name in the URL as well. Typically, simply changing the directory name in the WordPress settings would break all incoming links, something we definitely wanted to avoid.</p>
<p>Fortunately, it is very easy to change the directory and seamlessly redirect users to the new site by editing the &#8220;.htaccess&#8221; file at the root of your blog.</p>
<p>Simply add the following line:</p>
<pre><code>RewriteRule ^olddirectory(.*) newdirectory$1 [L,R]</code></pre>
<p>So, in my case, I was redirecting from the old blog called &#8220;Campaign&#8221; to a new one called &#8220;Obama&#8221;, so my addition looks like this:</p>
<pre><code>RewriteRule ^campaign(.*) obama$1 [R,L]</code></pre>
<p>For the most part this is self-explanatory if you are familiar with regular expressions. The caret is an anchor signaling the start of the redirect directory and the <code>(.*)</code> is a catch-all, ensuring everything following the old directory will be included in the redirect.</p>
<p>The &#8220;<code>[R,L]</code>&#8221; at the end are flags to, first, force the redirect and, second, to show that is the end of the redirection in that particular RewriteRule. Both flags are required.</p>
<p>Apache has <a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteRule">detailed documentation on using RewriteRule</a>, including specifics on the use of flags.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.darrenkrape.com/categories/design-and-development/redirecting-wordpress-mu-using-htaccess/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
