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.

Weird subdomain problem

Discussion in 'General Discussion' started by fingerprn, Sep 13, 2013.

  1. fingerprn

    fingerprn Member

    Joined:
    Feb 19, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    One of my clients is having a weird subdomain problem. The account has 5 subdomains, but one of them isn't redirecting correctly. The subdomain is ang.mydomain.com but it's redirecting to www.mydomain.com/ang/

    (To be clear, the folder is correct, but we don't want the URL to be www.mydomain.com/ang/)

    I've tried removing and resetting the subdomain, but that didn't fix the problem. The DNS zone in WHM looks fine.

    Any ideas? Thanks in advance for your help.
     
  2. Sys Admin

    Sys Admin Well-Known Member

    Joined:
    Apr 29, 2007
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Are they using your nameservers or other external dns servers?
     
  3. fingerprn

    fingerprn Member

    Joined:
    Feb 19, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    They're using my nameservers. I manage their account for them. All 5 subdomains were set up through an account-level cPanel interface. It's been a few months since I set up the subdomain in question, so I can't remember if there were any errors when it was first set up (the subdomain is only now being used).
     
  4. Sys Admin

    Sys Admin Well-Known Member

    Joined:
    Apr 29, 2007
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Is there any content within the ang dir at the moment? If so, I would suggest checking the .htaccess file for any rewrite statements that could be causing this redirection issue. Otherwise try removing and re-creating the subdomain again.
     
  5. fingerprn

    fingerprn Member

    Joined:
    Feb 19, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    That was it! Sort of.

    It turns out that all of the other subdomains had an .htaccess file except that one. I'm not exactly sure why not having one would cause this problem, but since it's working now I'm not going to worry about it. Thank you for your help!

    (BTW, for anyone else with this problem, don't forget to clear your local DNS cache after making the change. At first I thought the solution hadn't worked until I remembered to clear the cache.)
     
  6. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Those subdomains reside in subdirectories, and if there is a .htaccess file in the root directory, settings in that .htaccess are in effect in subdirectory also, unless overridden in a .htaccess file residing in that subdirectory.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page