This question is very similar to Redirect subdirectory of old domain to root folder of new domain via htaccess but that one is not a complete answer for me, so here goes:
- My client has static HTML page site with a Wordpress blog in www.olddomain.com/blog/
- We just moved her blog (and other content) to Wordpress, now situated as as www.olddomain.com
- We're keeping the same permalink structure in hopes that olddomain.com/blog/some-post can redirect to olddomain.com/some-post.
- She also has other 301 redirects in the same .htaccess file; most are domain name redirects to static pages in her old site that she's keeping in parallel with the Wordpress site.
- From my reading, I need to put the standard Wordpress IfModule statement at the bottom of the htaccess file, which I have done.
What I need are the lines that will redirect any blog posts from the old location to the new location, something like:
RewriteCond %{HTTP_HOST} ^olddomain\.com [NC] [OR]
RewriteCond %{HTTP_HOST} ^www\.olddomain\.com [NC]
RewriteRule ^blog/(.*)$ olddomain.com/$1 [R=301,L]
Will these work? Where do they need to be in the file if there are other 301 statements for unrelated domains?
Toolie