Location directive causing a redirect?

Maxim Dounin mdounin at mdounin.ru
Tue Sep 21 12:45:44 MSD 2010


Hello!

On Mon, Sep 20, 2010 at 08:49:13PM -0700, W. Andrew Loe III wrote:

> Using the following configuration, causes a request for
> domain.com/blog to 301 to domain.com/blog/ even with debug on error
> log I cannot see where this is happening in nginx.
> 
>     location ^~ /blog/ {

[...]

>       proxy_pass http://blog;
>     }

Locations ending with '/' with proxy_pass (fastcgi_pass, ...) will 
do implicit directory like redirect ("/blog" -> "/blog/").  Grep 
for 'auto_redirect' in sources.

Maxim Dounin



More information about the nginx mailing list