My umbraco installation has been running great. I have some legacy pages where they are either in html or shtml. The custom error works if the 404 on aspx, but if it goes to html/shtml, I get regular 404 with IE, or some silly browsers will throw blank page. Is there a way to use custom error with non aspx pages? How do I do this?
In order to do this, you would need to have access to IIS on the server. In the website properties you can specify custom errors for IIS. Just point the errors that you want (looks like 404 in your case) at the url for your custom 404 page. Here's a link on how to do this in IIS6 it might be slightly different for your version of IIS, depending on wheich version you are running.
the box is mine, I have full control of the server. I tried that above, and it didn't work. I tried setting custom control in asp, in iis as well as in umbracoConfig file, none worked for plain html.
I'm using IIS 7.5, after looking at google, it seems that there is no way of showing custom error for non aspx, only for aspx pages. There was a talk about converting the appworker into classic from integrated pipeline. Well I'd rather not do that.
Do you have a wildcard map set up for the site (for extensionless urls)? If not, you could try setting that up, as that should route requests for non-aspx file through the .net pipeline, resulting in the correct 404 errors etc.
error handling for non aspx pages in umbraco
My umbraco installation has been running great. I have some legacy pages where they are either in html or shtml. The custom error works if the 404 on aspx, but if it goes to html/shtml, I get regular 404 with IE, or some silly browsers will throw blank page. Is there a way to use custom error with non aspx pages? How do I do this?
In order to do this, you would need to have access to IIS on the server. In the website properties you can specify custom errors for IIS. Just point the errors that you want (looks like 404 in your case) at the url for your custom 404 page. Here's a link on how to do this in IIS6 it might be slightly different for your version of IIS, depending on wheich version you are running.
http://www.webmonkey.com/2010/02/create_custom_404_pages/
You can repeat the process for any other custom error pages that you might have.
the box is mine, I have full control of the server. I tried that above, and it didn't work. I tried setting custom control in asp, in iis as well as in umbracoConfig file, none worked for plain html.
I'm using IIS 7.5, after looking at google, it seems that there is no way of showing custom error for non aspx, only for aspx pages. There was a talk about converting the appworker into classic from integrated pipeline. Well I'd rather not do that.
Do you have a wildcard map set up for the site (for extensionless urls)? If not, you could try setting that up, as that should route requests for non-aspx file through the .net pipeline, resulting in the correct 404 errors etc.
I use extensionless urls with the server, yes.
I've corrected this problem by using url rewriter 2.0. If anyone's looking for the same, here's the code:
you have to add the umbraco* folders, otherwise editing html in the tinymce will redirect you to the error page.
I just used Chris suggestion on a Surftown hosted website (Danish webhosting company), and it worked. Thx a 1.000.000!
is working on a reply...