preventing rewrite loops with "index"
Maxim Dounin
mdounin at mdounin.ru
Mon Jan 25 02:13:05 MSK 2010
Hello!
On Sun, Jan 24, 2010 at 10:45:32PM +0100, Piotr Sikora wrote:
> >2. Note "internal" in location /users/. It means "only visible
> >for internal redirects", so even user called "users" should be
> >correctly processed by the first location.
>
> Actually, this isn't true. Any attempt to access internal location
> results in 404 response.
>
> You can verify this with very simple configuration:
>
> server {
> listen 8000;
> location / { return 500; }
> location /x { internal; return 500; }
> }
>
> Accessing /x will result in 404 response.
True, I was wrong here. Actually I wasn't sure and that's why I
used "should". :)
> This is a bug and it's somewhere on my TODO list.
Strictly - it's not bug, it's just how internal locations work
now. But I agree it's a probably good idea to change semantics
and make them just invisible for external requests.
Maxim Dounin
More information about the nginx
mailing list