Welcome! Log In Create A New Profile

Advanced

Re: try_files doubleslash mystery

Maik Beckmann via nginx
August 18, 2019 05:42AM
Am Sa., 17. Aug. 2019 um 20:04 Uhr schrieb Francis Daly <francis@daoine.org>:
> """
> The path to a file is constructed from the file parameter according to
> the root and alias directives. It is possible to check directory’s
> existence by specifying a slash at the end of a name, e.g. “$uri/”.
> """
>
> $foo does not end in slash, so try_files looks for a file of that
> (expanded) name, and fails to find it.
>
> $foo/ does end in slash, so try_files looks for a directory of that
> (expanded) name, and finds it and serves it (which involves a
> subrequest/internal redirect).
>

Thank you for your answer, Francis.

I've read the quoted documentation about try_files before. That it
searches for an directory with $uri/ . I did not understand that it
isn't about the content of the variable, but only about the appended
slash. Thank you.

What I still don't understand is how the existence of an directory
results in subrequest/internal redirect. Is that documented
somewhere?

Have a good Sunday.

Regards
Maik Beckmann

PS: It has been years since I've used mailing lists. I do not trust
GMail to handle it properly nowadays. It used to "just work". Sorry
if I mess up.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

try_files doubleslash mystery

Maik Beckmann via nginx August 17, 2019 04:26AM

Re: try_files doubleslash mystery

Francis Daly August 17, 2019 02:06PM

Re: try_files doubleslash mystery

Maik Beckmann via nginx August 18, 2019 05:42AM

Re: try_files doubleslash mystery

Francis Daly August 20, 2019 09:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 318
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready