how to redirect www.mysite.com to www.mysite.com/forum

Discussion in 'Site & Server Administration' started by Alvin, Aug 29, 2006.

  1. #1
    Hello
    can anyone help me with setting up a redirect to folder
    for example

    i want to redirect www.mysite.com to www.mysite.com/forum

    can anyone please paste a code for .htaccess file or tell me any other way to do it

    thank you
     
    Alvin, Aug 29, 2006 IP
  2. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Something like this?

    
    RewriteEngine on
    RewriteRule ^$ http://www.mysite.com/forum [R=301]
    
    Code (markup):
    If '/forum' is a directory, then it's more efficient to redirect to '/forum/' (i.e. with trailing slash).

    Cryo.
     
    Cryogenius, Aug 29, 2006 IP
    Alvin likes this.
  3. Alvin

    Alvin Notable Member

    Messages:
    2,076
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    210
    #3
    can you please explain this? I didnt get what you mean by if forum is a directory
     
    Alvin, Aug 29, 2006 IP
  4. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Is '/forum' a directory? Or is it a script? If it is a directory (i.e. contains index.php) then you should use the form '/forum/'.

    If you don't follow what I'm on about, don't worry about it, your site will still work fine.

    Cryo.
     
    Cryogenius, Aug 29, 2006 IP