htacess problem, please help!

Discussion in 'Apache' started by Solid_Nuts, Jul 29, 2007.

  1. #1
    Hi, i have a problem with htacess, i have 3 domains on one hosting plan one in the root and 2 in there own dir, problem is that im running a CMS in the root which has a .htaccess which in turn is blocking off access to the other 2 sites

    example

    domain.com> which is hosted in the Root with the .htacess
    >domain2.com is hosted in domain.com/fun
    >domain3.com is hosted in domain.com/sport

    so what code do i need to insert to get all the domains working? please be specific as possible.

    hope thats clear enough to get some help! thanks :)
     
    Solid_Nuts, Jul 29, 2007 IP
  2. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #2
    Can you post the .htaccess please? Or the relevant sections if you know.
     
    krt, Jul 30, 2007 IP
  3. Solid_Nuts

    Solid_Nuts Active Member

    Messages:
    886
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    60
    #3
    ok i found the solution if anyone is having the same problems with .htacess and multipl domains on same hosting plan just insert this code into your site and adjust the domain name and folder name which is hosting the sub sites.


    RewriteCond $1 !^folder1/
    RewriteCond %{HTTP_HOST} ^www\.domain1\.org
    RewriteRule (.*) /folder1/$1 [L]
    #
    RewriteCond $1 !^folder2/
    RewriteCond %{HTTP_HOST} ^www\.domain2\.com
    RewriteRule (.*)/folder2/$1 [L]
     
    Solid_Nuts, Jul 30, 2007 IP