babe in the woods with htaccess...

Discussion in 'Apache' started by carowan, Apr 13, 2006.

  1. #1
    I recently moved my forums from a subdomain to a folder in the root.

    Rather than getting 404 errors for all of my old forum posts, I would like them to forward to the same post, just with a different url due to the move.

    Old URL

    http://forums.mysite.com/member.php?u=1

    Resolve to

    http://www.mysite.com/Forums/member.php?u=1


    I have never really messed with htaccess, so I am unsure of how it is done.

    Where should I add this .htaccess? to the mysite.com/Forum folder or to the root?

    Does anyone have any advice?

    Thanks


    Nintendo, that is a great tutorial you wrote, didnt pick up on everything, but will reread.
     
    carowan, Apr 13, 2006 IP
  2. Slapyo

    Slapyo Well-Known Member

    Messages:
    266
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    108
    #2
    See if that works.
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^forums.mysite.com [NC]
    RewriteRule ^(.*)$ www.mysite.com/Forums/$1 [L,R=301]
    Code (markup):
     
    Slapyo, Apr 13, 2006 IP
  3. carowan

    carowan Peon

    Messages:
    473
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks, I will give it a shot.
     
    carowan, Apr 13, 2006 IP