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

Maxim Dounin mdounin at mdounin.ru
Tue Mar 18 15:08:23 UTC 2014


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 Dounin
http://nginx.org/



More information about the nginx mailing list