Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
So I've been looking for a solution but haven't found anything concrete.
I have a 404 page HTML page that I want as my 404 and for any other errors, 500, 404 etc.
Is there a way to get this page to render on errors? I have looked in the config files for custom errors but I can't see any rules for the pages.
Also is there a way to do this dynamically? So have one template for all errors and set the status code based on the error.
I.e. A 500 error will display 500 etc.
For the 404, I tend to just add to the <errors> block in umbracoSettings.config Like so;
<errors>
umbracoSettings.config
<errors> <error404>1431</error404> </errors>
Sometimes (IIS 7.5+) this can need the extra line below adding to the web.config
web.config
<system.webServer> <httpErrors existingResponse="PassThrough"/> </system.webServer>
But I dont think you can just add more errors above, especially 500, you'd probably need to set that using the web.config again. Try: <customErrors mode="On" defaultRedirect="~/error.aspx"> where error.aspx is your (ideally static) 500 page.
<customErrors mode="On" defaultRedirect="~/error.aspx">
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Custom error pages
So I've been looking for a solution but haven't found anything concrete.
I have a 404 page HTML page that I want as my 404 and for any other errors, 500, 404 etc.
Is there a way to get this page to render on errors? I have looked in the config files for custom errors but I can't see any rules for the pages.
Also is there a way to do this dynamically? So have one template for all errors and set the status code based on the error.
I.e. A 500 error will display 500 etc.
For the 404, I tend to just add to the
<errors>
block inumbracoSettings.config
Like so;Sometimes (IIS 7.5+) this can need the extra line below adding to the
web.config
But I dont think you can just add more errors above, especially 500, you'd probably need to set that using the
web.config
again. Try:<customErrors mode="On" defaultRedirect="~/error.aspx">
where error.aspx is your (ideally static) 500 page.is working on a reply...