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.

Addon Domain / Subdomain bug?

Discussion in 'General Discussion' started by IdleServ, Jun 5, 2004.

  1. IdleServ

    IdleServ Active Member

    Joined:
    Oct 27, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    After adding an addon domain (addon.com), it should be accessible via addon.com

    Now, I have set up redirection on
    domain.com/index.html >> redirect.com
    So the main domain should be redirecting. This works fine.

    The problem is that the addon domain also follows the redirection.

    I know the addon domain was setup right in Cpanel because
    accessing addon.com/test/ actually reads from ~/html_dir/addon/test/

    I read that this is cPanel's fault. What is the solution?

    9.3.0-RELEASE 5

    Help much appreciated!!

    Paul
     
  2. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    Where did you read this at?
     
  3. IdleServ

    IdleServ Active Member

    Joined:
    Oct 27, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    On this forum.

    A post said that there is a bug in cPanel which causes behaviour like this, as it writes incorrectly to httpd.conf

    However, the entries in my httpd.conf look different and the post was from a while back so if there was a cPanel problem it may well be sorted now.

    My problem remains though :\

    Paul
     
  4. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    If I am reading your first post correctly you are saying that you added on domainA.com to forward to DomainB.com. And on DomainB.com you have it forward to redirect.com?

    Is that correct?
     
  5. IdleServ

    IdleServ Active Member

    Joined:
    Oct 27, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    errr,

    Let's put it this way:

    I have MainDomain.com
    I addon AddonDomain.com to it.

    I set redirect MainDomain.com/index.html >> google.com
    This works. http://MainDomain.com redirects to google.

    BUT, http://AddonDomain.com also redirects to google.com
    Why?


    Thanks,
    I hope this is clearer! :)

    Paul
     
  6. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    Umm, of course it's going to do that. Maindomain.com forwards to google. Then when you forward addondomain.com to maindomain.com it does just that. It does forward to maindomain.com, but you have all traffic of maindomain.com to forward to google. So then addondomain.com also goes there.
     
  7. IdleServ

    IdleServ Active Member

    Joined:
    Oct 27, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    addondomain has *no* redirecting set whatsoever. :\
    It should not be redirecting. It should be displaying ~/html_dir/addondomain/

    Paul
     
  8. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    Where did you set the redirection for the main domain? In WHM? In Cpanel? If in Cpanel, what did you put in the first field? A single forward slash?
     
  9. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    The way you put it made it sound like addondomain was pointing to maindomain.com
     
  10. IdleServ

    IdleServ Active Member

    Joined:
    Oct 27, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    In Cpanel.
    The first field was index.html

    cPanel says:

    Current Redirects
    /index.html


    You see, AddonDomain has a corresponding directory under MainDomain's document root.
    http://AddonDomain.com should have its document root at /home/myusername/html_dir/addondomain/
    this is ok. It can access files/directories from there...

    Just not index.html or http://AddonDomain.com/ as this causes it to forward to google.com

    This help is appreciated guys. It'd be great to have a solution.

    Paul

    btw, I am using google.com as an example of what i am forwarding to.
     
  11. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    What do the .htaccess files in /home/myusername/html_dir/ and
    in /home/myusername/html_dir/addondomain/ show?
     
  12. IdleServ

    IdleServ Active Member

    Joined:
    Oct 27, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    /home/myusername/html_dir/.htaccess contains 1 line:
    Redirect temp /index.html http://www.google.com

    /home/myusername/html_dir/addondomain/ contains no .htaccess file.

    This seems right to me.

    Paul
     
  13. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    Yes, it is right. Does addonfolder.maindomain.com (the subdomain) get redirected to google?
     
    #13 goodmove, Jun 6, 2004
    Last edited: Jun 6, 2004
  14. IdleServ

    IdleServ Active Member

    Joined:
    Oct 27, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Yes it does.
     
  15. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    #15 goodmove, Jun 6, 2004
    Last edited: Jun 6, 2004
  16. IdleServ

    IdleServ Active Member

    Joined:
    Oct 27, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Yes httpd.conf contains all of that.
    In the same order and in the same format. :\

    Paul
     
  17. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    Make sure there isn't a Server Alias for the addondomain under the main domain (in httpd.conf).

    The addon domain may have been parked on top of the main domain before it got set up as an addon.
     
  18. IdleServ

    IdleServ Active Member

    Joined:
    Oct 27, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Looking at my httpd.conf, I see:

    <VirtualHost xx.xx.xx.xx>
    ServerAlias www.maindomain.com maindomain.com
    Serveradmin xxxxxxxxxx
    Documentroot xxxxxxxx
    ...etc, etc

    then lower down in httpd.conf I have:

    ServerName addonfolder.maindomain.com
    ServerAlias www.addondomain.com addondomain.com
    ServerAlias www.addonfolder.maindomain.com
    ...etc, etc


    There is no mention of anything to do with the addon domain in the middle of the MyDomain properties. If that is what you meant.

    Paul
     
Loading...

Share This Page