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.

subdomains redirecting when they shouldn't

Discussion in 'General Discussion' started by swagger, Mar 13, 2009.

  1. swagger

    swagger Registered

    Joined:
    Jun 26, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel 11.24.4-R34548 - WHM 11.24.2 - X 3.9

    I'm doing maintenance on a client's cPanel system. He recently had someone else working on it, but I don't know what all was done. When this other person was done with it, all his subdomains became redirects (sub.example.com redirecting to www.example.com/sub).

    I went in and removed the redirect on one of the subdomains, and now sub.example.com is redirecting to www.example.com/index.php. If I load www.example.com/sub, the site loads as it's supposed to.

    I've checked for .htaccess issues, httpd.conf and looked for any custom includes for that domain (none existed). I've also found the cPanel apache config at /var/cpanel/userdata/<user>/sub.example.com and everything in there looks fine - the data in there matches what's in httpd.conf.

    I'm not a cPanel guru or anything, but I'm fairly proficient with apache and I think I've been fairly thorough in looking for what's causing this from an apache perspective.

    I've found lots of info via google on how to set up a redirect, but nothing on how to solve for an unwanted redirect.

    Any tips?

    TIA
     
  2. hzJayJ

    hzJayJ Well-Known Member

    Joined:
    Nov 14, 2008
    Messages:
    76
    Likes Received:
    1
    Trophy Points:
    8
    Hello,

    Please check the settings for the sub-domain in the cPanel.

    cPanel >> Subdomains.

    These will be the options you will see for setting a subdomain.

    Subdomains Root Domain Document Root Redirection Actions

    Please check whether the document root and the redirection are set correctly.

    You could disable redirection by going to the following location of cPanel.

    cPanel >> Subdomains >> manage redirection (for the respective sub-domain)

    click Disable redirection to disable the redirection.
     
  3. swagger

    swagger Registered

    Joined:
    Jun 26, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Thanks for the reply.

    I've already done all that - I pulled my hair out over this for the better part of a day and went through pretty much every setting I thought even might have some effect, as both the non-privileged user and the cPanel admin.

    I'm thinking that it may have something to do with ExpressionEngine, which is what the client is running on that site, although if I load the subdomain content by accessing it via the directory (www.example.com/subdomain/) it works...

    It's terribly frustrating. :mad:
     
  4. avera

    avera Registered

    Joined:
    Jan 14, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I am experiencing exactly the same problem. Did anyone ever find a resolution to this issue?
     
  5. fkatzenb

    fkatzenb Well-Known Member

    Joined:
    Sep 23, 2009
    Messages:
    216
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lusby, Maryland, United States
    cPanel Access Level:
    Root Administrator
  6. jannollo

    jannollo Registered

    Joined:
    Mar 10, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I'm having the same problem, but it gets even weirder: One sub domain works as it should, the others not. Any ideas?
     
  7. jannollo

    jannollo Registered

    Joined:
    Mar 10, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Ok, I think my problem was the .htaccess. The subdomain pointed to a subfolder of a Drupal 5 install which has an .htaccess like this:
    [drupal] Contents of /drupal/.htaccess

    Moving the folder out of the Drupal root solved my problem. I'm not sure which part of the .htaccess was causing problems.
     
Loading...

Share This Page