Redirect (almost) all subdomains to www?

Thomas Delonge lists at
Tue Sep 28 17:15:02 MSD 2010

I have two "server" directives.

One has:


The other has:


Both do what they should. However, right now any subdomain (besides
"") is the exact same as www. I would prefer if things
were redirected so that a user cannot use "" to
see the website. I also don't want them to be able to use it without a
www (e.g.

Basically all requests should be directed to have the www subdomain
(except for

What's the best way to do this?
Posted via

More information about the nginx mailing list