Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    306
    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!! :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. ace

    ace Active Member

    Joined:
    Sep 24, 2001
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    306
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice