You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Custom 404 works, but only when you try a page on root that doesn't exist (such as "/asdfasfasf"). Old 404 appears, if you try a page in directory css, js or img(such as "/img/asdfasdfasfd").
The text was updated successfully, but these errors were encountered:
sdomi
changed the title
404 page doesn't appear if the directory is real
404 page doesn't appear if the directory the page is in exists
May 7, 2017
These handlers match every route with a css/js/img prefix and return the default 404 response. The NotFoundHandler will only be used when no route was found.
If you want to return the custom 404 page you'd have to wrap the handler with a customized one that checks if http.ResponseWriter.WriteHeader(int) got called with http.StatusNotFound.
Custom 404 works, but only when you try a page on root that doesn't exist (such as "/asdfasfasf"). Old 404 appears, if you try a page in directory css, js or img(such as "/img/asdfasdfasfd").
The text was updated successfully, but these errors were encountered: