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.

Please help - Subdomain problem

Discussion in 'General Discussion' started by ace, Oct 22, 2001.

  1. ace

    ace Active Member

    Joined:
    Sep 24, 2001
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    I\'m having a problem with default catch-all subdomains on user accounts (*.userdomain.com) Valid subdomains parse correctly in apache, however, if there\'s a subdomain the user hasn\'t added and a visitor tries visiting it, it will take the visitor to the first VirtualHost listed in httpd.conf.. I hope that makes sense. :) In other words, let\'s say user2 has test.domain.com - a visitor visits testing.domain.com (which doesn\'t exist) it will send the visitor to user1\'s domain.

    These named-based accounts are being added to the main server\'s IP. The main website for the server has a dedicated IP different than the main IP -- if that helps.

    Please offer any suggestions to get this problem resolved. Thanks in advance!! :)
     
  2. ace

    ace Active Member

    Joined:
    Sep 24, 2001
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Ok, I guess I solved the problem. I added a <virtualhost> with the same IP the name-based accounts are on, and redirected that to an error page. So, if a visitor types a subdomain that doesn\'t exist, they get the errorpage.

    I was under the impression that there was a way to redirect the visitor back to the domain owner\'s homepage.

    Anyway, is there any problems with what I\'ve done?
     
Loading...

Share This Page