<?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/"
xmlns:media="http://search.yahoo.com/mrss/"
><channel><title>YoastWordPress - Archives - Yoast - Tweaking Websites</title> <atom:link href="http://yoast.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" /><link>http://yoast.com</link> <description>Tweaking Websites</description> <lastBuildDate>Mon, 06 Sep 2010 07:27:28 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <image><title>Yoast</title> <url>http://cdn.yoast.com/wp-content/themes/yoast-v2/images/yoast-logo-rss.png</url><link>http://yoast.com</link> <width>144</width> <height>103</height> <description>Tweaking Websites</description> </image> <item><title>Changing your permalink structure</title><link>http://yoast.com/changing-your-permalink-structure/#utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=changing-your-permalink-structure</link> <comments>http://yoast.com/changing-your-permalink-structure/#comments</comments> <pubDate>Tue, 03 Oct 2006 14:16:17 +0000</pubDate> <dc:creator>Joost de Valk</dc:creator> <category><![CDATA[WordPress]]></category> <category><![CDATA[apache]]></category> <category><![CDATA[htaccess]]></category> <category><![CDATA[permalinks]]></category> <category><![CDATA[SEO]]></category> <category><![CDATA[Serverside]]></category><guid
isPermaLink="false">http://www.joostdevalk.nl/blog/changing-your-permalink-structure/</guid> <description><![CDATA[<p>I recently changed the permalink structure of this WordPress blog, going from /%year%/%monthnum%/%day%/%postname%/ (WordPress default i think) to the much more elegant and simple /%postname%/. This is very cool ofcourse, both because it's simpler and SEO wise, but on an existing blog, this leaves you with lots of links that point to the wrong URL. [...]</p><p><a
href="http://yoast.com/changing-your-permalink-structure/">Changing your permalink structure</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></description> <content:encoded><![CDATA[<p>I recently changed the permalink structure of this WordPress blog, going from <code>/%year%/%monthnum%/%day%/%postname%/</code> (WordPress default i think) to the much more elegant and simple <code>/%postname%/</code>. This is very cool ofcourse, both because it's simpler and SEO wise, but on an existing blog, this leaves you with lots of links that point to the wrong URL. If you're running your blog on Apache, the solution is quite simple, if you can tweak your <code>.htaccess</code> file or your Apache config.</p><p>The solution can be found in one single RedirectMatch line. This line should be placed above the WordPress code, or in the Apache config. The line is the following:</p><div
class="wp_syntax"><div
class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">RedirectMatch</span> <span style="color: #ff0000;">301</span> /([<span style="color: #ff0000;">0</span>-<span style="color: #ff0000;">9</span>]+)/([<span style="color: #ff0000;">0</span>-<span style="color: #ff0000;">9</span>]+)/([<span style="color: #ff0000;">0</span>-<span style="color: #ff0000;">9</span>]+)/(.*)$ 
http://www.<span style="color: #00007f;">example</span>.com/$<span style="color: #ff0000;">4</span></pre></div></div><p>This matches every URL which starts with  a date, and permanently redirects it to the new URL for this post. Ofcourse you could be running your blog in a subdirectory, like I am, in that case, the line would be:</p><div
class="wp_syntax"><div
class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">RedirectMatch</span> <span style="color: #ff0000;">301</span> /subdir/([<span style="color: #ff0000;">0</span>-<span style="color: #ff0000;">9</span>]+)/([<span style="color: #ff0000;">0</span>-<span style="color: #ff0000;">9</span>]+)/([<span style="color: #ff0000;">0</span>-<span style="color: #ff0000;">9</span>]+)/(.*)$
http://www.<span style="color: #00007f;">example</span>.com/subdir/$<span style="color: #ff0000;">4</span></pre></div></div><p>This way, all your incoming links will still work, and thus count for SearchEngines <em>and</em> you have the benefits of the new URL structure.</p><p><a
href="http://yoast.com/changing-your-permalink-structure/">Changing your permalink structure</a> is a post from <a
href="http://yoast.com/about-me/">Joost de Valk</a>&#39;s <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></content:encoded> <wfw:commentRss>http://yoast.com/changing-your-permalink-structure/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc (request URI is rejected)
Database Caching 5/13 queries in 0.015 seconds using apc
Content Delivery Network via cdn.yoast.com

Served from: yoast.com @ 2010-09-10 02:28:11 -->