Welcome! Log In Create A New Profile

Advanced

Re: Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

Igal @ Lucee.org
June 07, 2017 06:26PM
On 5/31/2017 2:58 AM, iivan wrote:
> I updated nginx to version 1.13.0
>
> This rule that was working correctly right now makes me mistake in the
> browser: ERR_TOO_MANY_REDIRECTS
>
> if ($host ~* ^(.*)\.website\.com$) {
>
> set $sub_domain $1;
> rewrite ^/(.*)?$
> /index.cfm?event=dashboard&lista=$sub_domain&nuovoURL=$1 last;
>
> }

ERR_TOO_MANY_REDIRECTS usually means that you have an infinite loop, which makes sense to me because you run this rule for every subdomain, including the rewritten one, causing the rewritten URL to be rewritten over and over again.

You need to rewrite it to a subdomain that would not match that rule.


Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

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

Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

iivan May 31, 2017 05:58AM

Re: Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

iivan June 07, 2017 05:00PM

Re: Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

Igal @ Lucee.org June 07, 2017 06:26PM

Re: Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

iivan June 08, 2017 03:59AM

Re: Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

Francis Daly June 09, 2017 03:12AM

Re: Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

iivan June 09, 2017 04:14AM

Re: Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

Igal @ Lucee.org June 09, 2017 12:48PM

Re: Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

iivan June 09, 2017 03:06PM

Re: Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

Igal @ Lucee.org June 09, 2017 05:32PM

Re: Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

Francis Daly June 10, 2017 02:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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