rewrite cycle

Maxim Dounin mdounin at mdounin.ru
Thu Dec 15 14:08:39 UTC 2016


Hello!

On Thu, Dec 15, 2016 at 02:30:17PM +0300, Руслан Закиров wrote:

> Below is default foswiki config that falls into "rewrite or internal
> redirection cycle while processing
> "/bin/view/bin/view/bin/view/bin/view/bin/view/bin/view/bin/view/bin/view/bin/view/bin/view/Main/WebHome"".
> 
> This is Nginx 1.11.6.
> 
> Any ideas?
> 
>         location = / {
>             root $foswiki_root;
>             rewrite .* /Main/WebHome;
>         }
>         location ~ ^/([A-Z_].*)$ {
>             rewrite ^/(.*)$ /bin/view/$1;
>         }
>         location ~ ^/bin/([a-z]+) {

[...]

> 2016/12/15 14:24:02 [notice] 15695#0: *6 rewritten data: "/bin/view/Main/WebHome", ...

[...]

> 2016/12/15 14:24:02 [debug] 15695#0: *6 test location: ~ "^/([A-Z_].*)$"
> 2016/12/15 14:24:02 [debug] 15695#0: *6 using configuration "^/([A-Z_].*)$"

The configuration in question relies on case-sensitive location 
matching and won't work correctly with case-insensitive location 
matching nginx uses on Windows and macOS.  As per the debug log, 
it looks like case-insensitive location matching is used in your 
case.

-- 
Maxim Dounin
http://nginx.org/


More information about the nginx mailing list