me at myconan.net
Mon Oct 10 03:56:57 UTC 2016
I somehow can't make this scenario work:
/b/ <-- no index.html
1. site.com/a -> redirect to site.com/a/ -> show /a/index.html
2. site.com/b -> redirect to site.com/b/ -> show @fallback
try_files $uri $uri/index.html @fallback;
doesn't work quite well because #1 becomes this instead:
1. site.com/a -> show /a/index.html
browser, not `/a/`).
try_files $uri @fallback;
Just always show @fallback for both scenarios.
try_files $uri $uri/ @fallback;
Always return 403 for #2 because the directory exists and there's no
As a side note,
error_page 404 = @fallback;
Wouldn't work because as mentioned in the previous one, it returns 403
for #2 (directory exists, no index), not 404.
Is there any way to do it without specifying separate location for each
More information about the nginx