Need to redirect from site.com/forums to site.com

Discussion in 'HTML & Website Design' started by sweet_user, Jun 14, 2008.

  1. #1
    i have recently bought a domain they used to ave forums on it

    as site.com/forums but i installed a another script on that but i want to redirect the old pages to site.com how to do it.

    I dont know about htaccess so guide me thanks
     
    sweet_user, Jun 14, 2008 IP
  2. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #2
    rename any index.php or index.html file to index2.php / .html

    new index.php file

    <?php header("Location: http://www.site.com");?>
    PHP:
     
    crath, Jun 15, 2008 IP
  3. wendong

    wendong Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    301 redirect
     
    wendong, Jun 15, 2008 IP
  4. sweet_user

    sweet_user Peon

    Messages:
    238
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4

    how to do it dude
     
    sweet_user, Jun 15, 2008 IP
  5. rilwis

    rilwis Peon

    Messages:
    104
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You can try htaccess redirect:

    
    RewriteEngine On
    RewriteRule ^site\.com/forum/(.*) site\.com/$1 [R,L]
    
    Code (markup):
     
    rilwis, Jun 15, 2008 IP