Please help - Subdomain problem

ace

Active Member
Sep 24, 2001
34
0
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!! :)
 

ace

Active Member
Sep 24, 2001
34
0
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?