Welcome! Log In Create A New Profile

Advanced

Redirect (almost) all subdomains to www?

Thomas Delonge
September 28, 2010 09:28AM
I have two "server" directives.

One has:

server_name www.example.com;

The other has:

server_name admin.example.com;

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

Basically all requests should be directed to have the www subdomain
(except for admin.example.com)

What's the best way to do this?
--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Redirect (almost) all subdomains to www?

Thomas Delonge September 28, 2010 09:28AM

Re: Redirect (almost) all subdomains to www?

Reinis Rozitis September 28, 2010 09:36AM

Re: Redirect (almost) all subdomains to www?

António P. P. Almeida September 28, 2010 09:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 249
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready