Welcome! Log In Create A New Profile

Advanced

Re: Nginx rewrite to PHP

B.R.
April 21, 2012 10:40PM
Well, I didn't take the required time to understand these examples...
Those are definitely hopefully not to be seen in real config files! ;o)

Thank you for having taken time to explain all that to me.
I just made the change and my requests end up at the right places.

Thanks again!
---
*B. R.*


On Sat, Apr 21, 2012 at 22:32, Edho Arief <edho@myconan.net> wrote:

> 2012/4/22 B.R. <reallfqq-nginx@yahoo.fr>:
> > Thanks Edho,
> >
> > I also use the official reference first-hand ;o)
> > From the example given on the Wiki page of the Rewrite module you quoted,
> > they replace 'last' by 'break' when rewrite rules put inside a location
> > block...
> >
> > Isn't it a problem to put 'last' flags inside the location block? What is
> > the 10-cycles-then-500-error referring to?
>
> The 500 error is cause by the rewrite: it rewrites /download/ (clean
> url) to /download/ (actual file). If it use last flag, the /download/
> location block will be searched again (and in fact it may return 403
> instead of 500 if the rewritten url doesn't match the rewrite rule
> anymore - it'll return 500 only on certain cases).
>
> The one you want is for it to be handled by different location block
> (\.php$) - hence last flag.
>
> _______________________________________________
> 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

Nginx rewrite to PHP

B.R. April 21, 2012 10:14PM

Re: Nginx rewrite to PHP

Edho Arief April 21, 2012 10:20PM

Re: Nginx rewrite to PHP

B.R. April 21, 2012 10:24PM

Re: Nginx rewrite to PHP

Edho Arief April 21, 2012 10:34PM

Re: Nginx rewrite to PHP

B.R. April 21, 2012 10:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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