htaccess

Discussion in 'HTML & Website Design' started by fly4food84, Feb 13, 2009.

  1. #1
    I'm trying to configure my root htaccess file to do two things:

    1.) Redirect my domain.com to domain.com/forums/index.php
    2.) Force the use of www.

    Any help is much appreciated.
     
    fly4food84, Feb 13, 2009 IP
  2. plugandplay

    plugandplay Peon

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    most hosts have different ways to do those things, especially the redirection.

    Get a hold of them and they should be able to get it working for you.
     
    plugandplay, Feb 13, 2009 IP
  3. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #3
    Force www:

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

    Have a look over in the Site & Server Administration, and in the Apache forum, they're a bunch of htaccess geeks :D
     
    Kerosene, Feb 13, 2009 IP
  4. InputProductions

    InputProductions Banned

    Messages:
    88
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0