Welcome! Log In Create A New Profile

Advanced

Re: Q: about "best" way for remove www in hostname in nginxish

B.R.
May 06, 2013 02:32PM
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
Subject Author Posted

Q: about "best" way for remove www in hostname in nginxish

Aleksandar Lazic May 06, 2013 12:42PM

Re: Q: about "best" way for remove www in hostname in nginxish

mike May 06, 2013 12:50PM

Re: Q: about "best" way for remove www in hostname in nginxish

Jonathan Matthews May 06, 2013 12:52PM

Re: Q: about "best" way for remove www in hostname in nginxish

B.R. May 06, 2013 02:32PM

Re: Q: about "best" way for remove www in hostname in nginxish

Aleksandar Lazic May 06, 2013 04:22PM

Re: Q: about "best" way for remove www in hostname in nginxish

B.R. May 06, 2013 10:26PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 123
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