Redirecting A WordPress Blog From A Directory To The Root

Monday, December 22nd, 2008

Problem - You have an old blog in a directory and would like to move it to the domain, replacing your website's content at the root. Solution: use mod_alias redirectmatch Scenario one, you move a blog from /blog/ to the root. Here's the example code. RedirectMatch 301 ^/blog/(.*)/(.*)/$ http://www.yourdomain.com/$2/ Keep in mind this ...