I have these settings:
CustomHttpHandlers = {
{HttpStatusCode.NotFound, new RazorHandler("/notfound")},
{HttpStatusCode.Unauthorized, new RazorHandler("/unauthorized")},
}
When I visit something inside a /stars
folder that doesn't exist:
/stars/asdf/xyz
It first checks for /stars/asdf/default.cshtml
. Then goes to stars/default.cshtml
and loads whichever level that has default
page. So, only if /stars
root folder doesn't exist at all, then /notfound
would be loaded.
Is it possible to ask it to load /notfound
when /asdf/xyz
doesn't exist?
This is the behaviour under root directory:
http://localhost:2000/asdf
will take you to /notfound
. However, it doesn't do so under folders.
Tnank you.
EDIT ------------------------------------------------------
I noticed actually if I go to bad url /stars/asdf
where /stars
doesn't have a default but root /default.cshtml
actually exists, in that case, both /notfound
-> /default
are loaded up one after other?!?
My settings are wrong? SS glitched?