Hey all -
I've got a CentOS 5.2 server running Apache 2 and a menagerie of other packages. I'll try to make this quick:
- Server running Apache configured to load a variety of virtualhost configuration file in a /etc/httpd/conf/vhost folder. It loads all the virtual host files just fine and all the websites appear (subdomains and otherwise).
Main issue:
If a user browses something like 'nodomainexists.domainname.com' into a browser url bar, you're taken to the site whose vhost file was created last. I would much rather have users who attempt to use invalid subdomains to be forwarded to a specific virtualhost file (that runs the main website/frontend). How would I go about making sure that all non-existant subdomains get routed to a specific virtualhost?
For example:
last.domain.com exists (vhost file was created last)
not.domain.com doesn't exist (no vhost file, etc)
www.domain.com does exist (has vhost file, valid site)
When a user goes to not.domain.com, they'll get last.domain.com instead of being sent to
www.domain.com.
How would I go about making the
www.domain.com a catch all for bad and/or misspelled subdomains?
Thanks in advance!
Recent comments
18 hours 35 min ago
21 hours 30 min ago
22 hours 44 min ago
1 day 8 min ago
1 day 1 hour ago
1 day 3 hours ago
1 day 4 hours ago
1 day 20 hours ago
1 day 21 hours ago
2 days 1 hour ago