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.

Redirect all traffic to new sub domain?

Discussion in 'Search Engine Optimization' started by amaze, Sep 6, 2006.

  1. #1
    Hi,

    Currently our forum is hosted like this http://www.domain.com/forum. We are moving our forum too: http://forum.domain.com/.

    We have over 650k pages indexed in google. Is there anyway we can place a .htaccess redirect in the /forum/ root so ANY traffic hitting /forum/ will go to the new sub-domain?

    We have root access on a windows server 2003 box.
    SEMrush
    Thanks
     
    amaze, Sep 6, 2006 IP
    SEMrush
  2. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Bump..... :)
     
    amaze, Sep 6, 2006 IP
  3. Mong

    Mong ↓↘→ horsePower

    Messages:
    4,773
    Likes Received:
    730
    Best Answers:
    0
    Trophy Points:
    185
    #3
    i am not expert in it .. but i think 301 redirect would serve your purpose.

    but importantly why you have done it ?
     
    Mong, Sep 6, 2006 IP
  4. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #4
    amaze, Sep 6, 2006 IP
  5. jdevalk

    jdevalk Active Member

    Messages:
    420
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    68
    #5
    Yes it is:

    RedirectMatch 301 /forum/(.*) http://forum.domain.com/forum/$1

    That's all.
     
    jdevalk, Sep 6, 2006 IP
  6. stuey

    stuey Peon

    Messages:
    160
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6
    How about this. Put in home directory .htaccess

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com
    RewriteRule ^forum/?(.*) http://forum.domain.com/$1 [R=301,L]

    S
     
    stuey, Sep 6, 2006 IP
  7. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #7
    Thanks for the replies guys... What is the best solution? ...or is it 6 of one half a dozen of the other?
     
    amaze, Sep 7, 2006 IP
  8. jdevalk

    jdevalk Active Member

    Messages:
    420
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    68
    #8
    Mine is best ofcourse :p
     
    jdevalk, Sep 7, 2006 IP
  9. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #9
    ;)

    so literally do I just create a file called ".htaccess" and put the following code in there (in the /forum/ folder)?

    RedirectMatch 301 /forum/(.*) http://forum.domain.com/forum/$1
    PHP:
     
    amaze, Sep 7, 2006 IP
  10. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #10
    Hmm prob being thick but on windows server 2003 you can't have a filename ".htaccess"...
     
    amaze, Sep 7, 2006 IP
  11. jdevalk

    jdevalk Active Member

    Messages:
    420
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    68
    #11
    Hehe you started about that one :) Are you using apache? Or IIS?
     
    jdevalk, Sep 7, 2006 IP
  12. amaze

    amaze Active Member

    Messages:
    594
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #12
    I am using IIS..... :)
     
    amaze, Sep 7, 2006 IP