Sunday, 18 August 2013

apache2: why all subdomains redirect to www?

apache2: why all subdomains redirect to www?

I have NameVirtualHost *:80 in ports.conf and a VirtualHost who has
ServerName www.mysite.com in my conf file. I also have few subdomains
mapped to other VirtualHosts.
Currently if I access mysite.com with some arbitrarily picked subdomain
that is not configured as a subdomain in my config file, it redirects to
the one with www.. For example, if i try nowhere.mysite.com it goes to
www.mysite.com.
I don't think this is normal behavior on a web site. How can I ignore all
requests that does not go to any proper domain?

No comments:

Post a Comment