The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

confused about .htaccess and subdomains

Discussion in 'General Discussion' started by p3sn, Nov 2, 2012.

  1. p3sn

    p3sn Registered

    Joined:
    Nov 2, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Hi All,

    Today my hosting provider moved my WHM account to a virtual server. For some reason I have problems to open up the .htaccess file now in Coda... On the old account (still accessible on ip) I can edit the .htaccess file normally.

    An other problem I have now, is that if I create a subdomain and I point it to /public_html/dir1/dir2/ somehow I get an internal server error or a not found. Most of the times it is redirecting me to sub.domain.com/dir1/dir2

    But dir2 should be the root of the subdomain...

    Maybe you can help me, thanks.
     
  2. p3sn

    p3sn Registered

    Joined:
    Nov 2, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    I discovered it has something to do with .htaccess... This is strange because I didn't have this problem before it was moved. When I move the .htaccess file, the subdomains act normal. When I add it, subdomains get directed to the relative folder. So if I set subdomain.domain.ext to public_html/sub1/sub2,
    subdomain.domain.ext gets redirected to subdomain.domain.ext/sub1/sub2
     
  3. arunsv84

    arunsv84 Well-Known Member

    Joined:
    Oct 20, 2008
    Messages:
    373
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    We cant say anything without checking the error logs or the rules in your .htaccess. Could you please provide the logs here? You will be able to view the full details of logs in apache error log. Check it after logging to your cPanel or paste it here so we can have a look.

    Thanks.
     
Loading...

Share This Page