I do:
if ($host ~* "^www\.(.*)$") {
set "$domain" "$1";
rewrite (.*) http://$domain$uri permanent;
}
---
*B. R.*
On Mon, May 6, 2013 at 12:50 PM, Jonathan Matthews
<contact@jpluscplusm.com>wrote:
> That's how I do it, except that I hard-code a list of the domains I
> want to redirect. Otherwise, I'd have built a service that could be
> trivially used by anyone else for their own domain. Wildcards are bad,
> mmkay? ;-)
>
> IMHO and YMMV,
> Jonathan
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx