Im looking to merge two wordpress blogs which im fine with , however i cant figure out how to write some rewrite rules for the htaccess to automatically redirect one URL structure to the other. The site thats being moved is has post urls like this : [url]http://www.blognumber1.com/this-is-a-post-page/[/url] PHP: and the blog its being merged into has URL's like : [url]http://www.blognumber2.com/category/this-is-a-post-page.html[/url] PHP: Does anyone have any idea the kind of rewrite rules i would need to put up so that all of blog1's pages are redirected correctly to blog2's URL structure ?
Create a .htaccess in the root folder of www.blognumber1.com Code (markup): Or just edit, if there is one already existing. Add the following codes in it: Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.blognumber2.com/category/$1 [R=301,L] PHP: Change the domain accordingly.
Thanks for the reply, The "category" in the URL i think will be the problem because obviously after the merge the categories URL will be different and will not be a set category , I suppose i could setup a single category for the entire blog thats been merged instead of spreading the posts through the current sites categories.
oo if the permalink structure is different in anyway it might cause problems. You could try to install the Smart 404 plugin to try and auto-discover and auto-redirect to the right location. (using this in junction with the htaccess advice above.) http://wordpress.org/extend/plugins/smart-404/ Or you would have to setup all the redirections manually using a plugin like this: http://wordpress.org/extend/plugins/redirection/