Welcome! Log In Create A New Profile

Advanced

Re: Quick question

March 18, 2009 03:35PM
On Wed, Mar 18, 2009 at 12:06:36PM -0700, mike wrote:

> rewrites happen before location {} blocks are considered (if the
> rewrite is on a global level) correct?
>
> so
>
> location /foo {
> this will never be computed
> }
>
> rewrite /foo/bar /somethingelse permanent;
>
> That's at least what it seems to me, unless I'm missing something.
>
> It doesn't seem like ^~ ~* etc seem to matter either. Or is it all
> depending on the order in the config file?

Yes, as in Apache rewrites on server level run before location search.

Then (*) nginx chooses a location, then nginx runs rewrites inside
the location. If any rewrite is matched and it has not "break" flags,
then nginx chooses a location again, i.e, goes to (*).
This cycle may run no more than 10 times.


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

Quick question

mike March 18, 2009 03:34PM

Re: Quick question

Igor Sysoev March 18, 2009 03:35PM

Re: Quick question

mike March 18, 2009 03:53PM

Re: Quick question

Igor Sysoev March 18, 2009 03:55PM

Re: Quick question

mike March 18, 2009 04:05PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 113
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready