Migrating WordPress | arfore dot com

As some of you might have noticed, I have just recently moved my WordPress installation into a subdirectory of arfore.com.

There are several reasons for this, the main one being that I would like for my blog to become a component of my website rather than the blog being the entire site.

Moving the WordPress installation itself was quite simple, and there are many pages out there describing the process as well as the pitfalls of doing it incorrectly, so I won’t repeat them here.

What was less easy to find was the proper changes to put in the .htaccess file to ensure that any existing links would get redirected to the proper location in the moved WordPress setup.

I have my permalinks configured to create a URL like follows:

http://arfore.com/blog/2008/10/12/foo-bar-baz/

In order to add the subdirectory blog to the front of the URL I used the following rule in my .htaccess file:

RewriteRule ^([0-9](.*))$ http://arfore.com/blog/$1 [R=301,L]

Similarly, to redirect the categories I used the following:

RewriteRule ^category/(.*)$ http://arfore.com/blog/category/$1 [R=301,L]

Now this may not be the most correct method to accomplish the goal, so if it needs correcting by all means let me know.

%d bloggers like this: