Why doesn't Nginx rewrite directive support '@' named_location?

Hi,

I have a simple question:

Why doesn’t Nginx rewrite directive support ‘@’ named_location?

: )

Thanks

On Tuesday 18 March 2014 22:52:06 yzprofile wrote:

Hi,

I have a simple question:

Why doesn’t Nginx rewrite directive support ‘@’ named_location?

: )

The “rewrite” directive is intended to change request URI, while
the named locations are intended for redirecting without URI change.

wbr, Valentin V. Bartenev

Hi,

good change.
Thanks for you answer. : )

Regards.

Hello!

On Tue, Mar 18, 2014 at 10:52:06PM +0800, yzprofile wrote:

Hi,

I have a simple question:

Why doesn’t Nginx rewrite directive support ‘@’ named_location?

Simple answer is:

Because rewrite directive is to rewrite request URI as per it’s name,
while redirecting a request to a named location preserves request
URI (and that’s the sole purpose of named locations).

More complex one is:

Support of named locations in rewrites was discussed more than
once, and yet we’ve failed to convince Igor that it will be a
good change.


Maxim D.
http://nginx.org/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs