Thanks, I will test it.

Appreciate it.


On 4/16/13 11:07 AM, Jonathan Matthews wrote:
On 16 April 2013 15:47, David | StyleFlare <[email protected]> wrote:
Pardon me if I missed this in the docs...

My issue is that I want to rewrite every domain and not create a server
block for each.

I am trying to rewrite every domain thats pointing to Nginx

from www.server.com to server.com
Have a single separate server block do it for you:

server {
   listen 80;
   server_name ~^(www\.)(?<domain>.+)$;
   rewrite $scheme://$domain$uri$is_args$args;
}

(written but not tested; YMMV!)

Jonathan

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to