Index fallback?

Francis Daly francis at daoine.org
Mon Oct 10 06:23:27 UTC 2016


On Mon, Oct 10, 2016 at 12:56:57PM +0900, Edho Arief wrote:

Hi there,

untested, but...

> accessing:
> 1. site.com/a -> redirect to site.com/a/ -> show /a/index.html
> 2. site.com/b -> redirect to site.com/b/ -> show @fallback

> 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.

Would "error_page 403" Do The Right Thing?

(It may be that it matches more than you want it to, of course.)

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list