Results 1 to 9 of 9
  1. #1
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Question about 301 redirect and moving blog to domain
    I have a blog on one of my websites in a subdirectory:

    http://www.mydomain.com/blogaboutnfl.com

    I want to move the entire blog exactly as it is to its own domain:

    http://www.blogaboutnfl.com

    (Surprise -- those aren't the REAL names. Made 'em up for this example.)

    My question concerns doing a 301 redirect. How do I set it up? Do I leave the subdirectory intact on the old mydomain.com? Or do I delete it after I set up the .htaccess redirect? (Does that sound confusing enough? It's because I AM confused about redirects.)

    Also, there's a simple looking redirect feature on cpanel. Anybody ever use that? Will it work redirecting a whole subdirectory to a new domain root with a single command?

    Any help greatly appreciated!
    Generate more fake news.

  2. #2
    general fuq mrbshouse's Avatar
    Join Date
    January 18th, 2005
    Location
    Argieville
    Posts
    1,381
    if your on cpanel just look at the redirects tab and enter the urls in otherwise you need to add the redirects to your htacces.

    do you have just the one URL or more pages built into it? for additional pages I don't know if the wildcard redirect will be the one shot fix all or not maybe someone else will have that answer ;-)

    add this tyo you'r htacces file at the bottom
    RedirectMatch permanent ^/WPs$ http://www.domain.com/WP

    if you have not defined your site as www only now might be a good time to consider that depending on how you'r set up (avoiding the google dup gods)

  3. #3
    Moderator
    Join Date
    April 6th, 2006
    Posts
    2,689
    Before you setup the redirect.. have you installed on the new domain yet..?

    I know there are lots of ways to handle a redirect, but it's my preference to [first] install your blog on the new domain. You can disallow bots to it while you're testing.

    This might be stating the obvious, but I once (inadvertantly!) added a redirect before I was finished

    Then .. when the new domain is ready (same content, etc).. you setup the 301 redirect from domain.com/blog to newdomain.com. Pagerank from the old will flow to the new... and the old one will cease to exist (ie. no one will be able to access it anymore).

    Does WP allow you to copy the site easily, template & all ..? I just did a joomla site & it was a snap..

    Alternatively, you don't have to reinstall anything if you want to turn your blog into a subdomain (blog.domain.com), but that's not much different than what you have now.

    If you already have the new domain in place (with the blog!), the command is what mrbshouse said.. cpanel just inserts this line (which you can add yourself in .htaccess):

    redirect 301 /blog http://www.domainblog.com/

    Hope this helps!

  4. #4
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Excellent news. I appreciate the help. Yes, it's fairly straightforward with WP. I'll need to backup the database, then I can search-and-replace within the database to change the URLs of the links.

    Fortunately, the blog I'm moving to a domain has only a few dozen pages, posts, etc., unlike another blog I've had for 4 years -- that database is almost 6 megs.
    Generate more fake news.

  5. #5
    Lite On The Do, Heavy On The Nuts Donuts's Avatar
    Join Date
    January 18th, 2005
    Location
    Winter Park, FL
    Posts
    6,930
    good article about this subject:
    http://www.mattcutts.com/blog/moving-to-a-new-web-host/

    article discusses changing hosts, then, near the end, it also discusses moving things to a new domain. this info's right from the horse's mouth. i think it's worth a read.

  6. #6
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Thanks, Donuts, I'll check it out.
    Generate more fake news.

  7. #7
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Okay, I can't get any 301 redirect for the /blog subdirectory to the http://www.newdomain.com to work?? I tried using the cpanel redirect, and it threw me an Internal Server Error 500 no matter what I tried.

    Here's what I'm wondering about:

    There's an .htaccess file in the root at the old domain AND there's an .htaccess file in the /blog subdirectory, which is necessary as part of the WP install there to do permalinks and to run a couple of plugins.

    The cpanel redirect puts the redirect into the ROOT .htaccess file. If I try putting the command it generates into the /blog subdirectory .htaccess file -- same problem.

    Any suggestions? Anyone??

    Thanks.
    Generate more fake news.

  8. #8
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Hooray! I got it. I found a great explanation of how to do this as well as some other blog moving at this URL:

    <a href="http://www.bloggingtips.com/2007/04/18/moving-your-blog-to-a-different-directory-domain-name-or-host/">Moving your blog to a different directory, domain name, or host</a>.

    That's the best explanation I've found and I've done a lot of googling for it in the last few days.

    That discussion made it clear that I needed to put the redirect in the .htaccess file in the actual subdirectory I wanted to redirect, NOT in the root of the domain. And the command I used was this:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

    I hope that code will show up in this post. It was quick and effective.

    The blog I was moving had about 50 pages indexed in google, and I certainly didn't want to lose them! LOL!
    Generate more fake news.

  9. #9
    Believe knight01's Avatar
    Join Date
    August 14th, 2006
    Location
    Dayton, Ohio
    Posts
    1,815
    Ignore my pm. Glad you got it working.
    Someday starts today
    Military Discounts

  10. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. 301 redirect to shorten affiliate links?
    By GoColts in forum Newbie Affiliate FAQs & Helpful Articles
    Replies: 8
    Last Post: June 30th, 2008, 01:49 PM
  2. 301 redirect
    By martinsbca in forum WebMerge (Fourthworld.com)
    Replies: 0
    Last Post: February 27th, 2007, 05:05 PM
  3. Apache 301 Permanent Redirect Issue
    By popdawg in forum Domains & Hosting
    Replies: 3
    Last Post: September 21st, 2006, 09:50 PM
  4. 301 redirect using htaccess question
    By ~Michelle in forum Midnight Cafe'
    Replies: 5
    Last Post: February 26th, 2006, 09:16 PM
  5. .htaccess & 301 Redirect
    By ~Michelle in forum Search Engine Optimization
    Replies: 2
    Last Post: March 11th, 2005, 12:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •