redirecting a forum

Discussion in 'Apache' started by sholiz, May 23, 2006.

  1. #1
    OK here's my problem ...

    I've got my forum setup in a subdirectory to the root of the site, and I want to move all my files into my root so my forum isn't a subdirectory rather root access (I've got my reasons damn it!)

    But when I go to do this redirect, I'm guessing all the links about the site and in signatures are going to get messed up aswell ...

    What I mean is, say someone has http://www.url.com/forums/showthread.php?t=12345 but now the "live" version of vBulletin I'm running is no longer in /forums/ rather in root so it would be a not-found file.

    I'm wondering if there is a .htaccess redirect that can do this for me, I've looked into the subject but I've never been able to think like a coder and it's always been a challenge for me to do coding aspects of my web development.

    Any advice?
     
    sholiz, May 23, 2006 IP
  2. sholiz

    sholiz Active Member

    Messages:
    495
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Would this work ...

    RewriteEngine on
    RewriteBase /forums/
    RewriteRule ^/$ http://www.domain.com/$ [R=301,L]

    Or how can I edit this to make it work ... i need to take the string from the URL *AFTER* the root/forums/$files.php?t=328 and make sure it loads on the root as root/$files.php?t=328
     
    sholiz, May 23, 2006 IP