1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Move/Redirect Forum to a new domain

Discussion in 'Apache' started by onestop, Oct 19, 2005.

  1. #1
    Hi
    I have moved my forum to my new domain name, and I'd like to redirect the old forum to the new one. How can I do this?
    Old Forum URL: olddomain.com/oldforum/
    New Forum URL: newdomain.com/newforum/
    Thanks in advance
     
    onestop, Oct 19, 2005 IP
  2. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Search this forum for how to do that with your .htaccess file (if you are on Apache)
     
    exam, Oct 19, 2005 IP
  3. onestop

    onestop Well-Known Member

    Messages:
    534
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    138
    #3
    thanks exam, but searching the forum didn't help. I did a basic 301 redirect, but it only redirects the home page of the forum, not sub pages :(

    anybody can help?
     
    onestop, Oct 27, 2005 IP
  4. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can use mod_rewrite in Apache to redirect all your old urls to the new ones. I'm not an expert on mod_rewrite but there have been lots of helpful threads here on it.
     
    exam, Oct 27, 2005 IP
  5. onestop

    onestop Well-Known Member

    Messages:
    534
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    138
    #5
    I'm not an expert neither, if you read my message again, you'll see that I've tried a 301 redirect, but it only redirects the home page. I want to redirect the whole forum.

    Can anybody else help?
     
    onestop, Oct 28, 2005 IP
  6. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #6
    OK, I looked up some of my reference materials. Try putting this in your .htaccess file in the root directory of your old site.
    
    <IfModule mod_rewrite.c> 
    RewriteEngine On
    # RewriteBase / 
    RewriteRule ^(.*)$ http://www.new.com/$1 [R=301,L]
    </IfModule> 
    Code (markup):
    I'm not sure if the RewriteBase line is necessary. Right now it's commented out, if it doesn't work like that, remove the # sign. Also, replace www.new.com with your new domain name.
     
    exam, Oct 31, 2005 IP