Welcome to WebmasterWorld Guest from 54.161.201.200

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

Top Contributors Of The Month

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


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

blog.mysite.com

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)

Administrator

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

joined:Aug 10, 2004
posts:10748
votes: 43


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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members