Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Moving old wordpress blogs to new site on same server?

2:24 am on Sep 24, 2013 (gmt 0)

Full Member

5+ Year Member Top Contributors Of The Month

joined:May 11, 2012
posts: 314
votes: 3

So, I had a Wordpress blog for years setup on a subdomain.


One of the articles for instance was blog.mysite.com/article1/.

The root of the server hosts a CS-Cart shopping cart (PHP). I am trying to eliminate the blog. What I did was create an article in the shopping cart software (where the root is) called "article 1", so mysite.com/article1.html (a new page) exists.

I'm trying to make it so when people go to: blog.mysite.com/article1/, it sends them to mysite.com/article1.html

This is what I have in htacess fie located in the "blog" folder (which is what the subdomain points to):

RewriteRule ^article1/$ /article1.html/? [R=301,NE,NC,L]

It works. I mean, it forwards anybody trying to access blog.mysite.com/article1/ to mysite.com/article1.html. The problem is, if I go into Wordpress and delete "article1", I get a 404 error. The point of moving these articles is to eventually eliminate the blog.

Shouldn't it forward, whether or not the actual page exists on the subdomain? I thought basically says if any requests for /article1 are made... send to mysite.com/article1.html.

Has anybody changed their blog to another type of software and had to move content like this?
7:07 am on Sept 24, 2013 (gmt 0)


WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
votes: 67

actually your RewriteRule says to redirect to /article1.html/ on the current hostname, so i would expect it to redirect to http://blog.example.com/article1.html/ rather than http://example.com/article1.html

i would try something more like this:
RewriteRule ^article1/$ http://example.com/article1.html? [R=301,L]

you don't need the NE flag here and you don't want the NC flag.