I'm guessing this must be a setting in IIS, but I have several sites running with custom 404 pages on IIS6 and all I did was put the nodeID in the <error404>1264</error404> section in the umbracoSettings.config
But I have done this on a new site in IIS7 but it doesn't work, I get the default IIS 404 page? Am I missing something?
When you are in the settings of the error pages just right click on the 404 page and select Edit feature settings. There you can select `custom error pages` and it should work.
Visually your solution works, but there are 2 down-sides to it:
1. The original url is replaced by the url to the 404 page. No biggy, but it's nicer to show the visitor the actual url that does not exist.
2. More problematic is the underlying status code that you are returning. In this solution you get the visual 404, but if you check in e.g. FireBug you will see that it actually returns a 302 redirect which in turn gives the 404 page with a status code 200 OK. This is ok for ordniary vistiors but bots and google do not process redirects and scripts and will probably interprete the non existing page as existing but with a temporary new location.
So, unfortunately I am still looking for a 'true' solution.
Does anybody know why with pass-through mode I get a blank page for static files?
Is there a way to break into that process and make it redirect elsewhere?
You are very right. I noticed it later on when testing it again. I think I'd playing around with the error settings for too long and sort off lost track on what was and was not working. Thanks for replying though, makes be extra sure about the current implmentation.
Hi guys... I've stumbled upon this during me trying to solve the same issue... On windows server 2088 with iis7 I'm getting the respose.status = 200! I can see that you are on iis7.5 from the screen grab... any suggestions?
So rather than rely on the web.config to sort my 404, I tried to get the umbraco handle404 or a custom 404handler to sort my .htm not found files.
That gets me as far as stopping iis handling htm as StaticFile handler mapping...
However, even though now I get the asp.net server errror, for the 404 not found .htm file I still can;t get umbraco to handle it via the managed Handler...
Any gurus out there who can point me in the direction of an alternative to type="System.Web.UI.PageHandlerFactory" so that it gets passed to the correct umbraco handler... everything I've tried doesn't implement the IHttpHandler :-(
I have followed what is written here and updated the following:
in umbracoSettings.config I have:
<errors> <!-- the id of the page that should be shown if the page is not found --> <!--<error404> <errorPage culture="default">1</errorPage> <errorPage culture="en-US">200</errorPage> </error404>--> <error404>11550</error404> </errors>
IIS7 & 404?
I'm guessing this must be a setting in IIS, but I have several sites running with custom 404 pages on IIS6 and all I did was put the nodeID in the <error404>1264</error404> section in the umbracoSettings.config
But I have done this on a new site in IIS7 but it doesn't work, I get the default IIS 404 page? Am I missing something?
Hi Lee,
When you are in the settings of the error pages just right click on the 404 page and select Edit feature settings. There you can select `custom error pages` and it should work.
Cheers,
Bas
Hi - Sorry I'm not following you, are you saying I do have to go into IIS and change settings?
Hi,
Yes, it is a setting in IIS. Can I have your E-mail adress so i can send you some screenshots?
Bas
Lee,
I had this same problem. I followed the instructions on http://umbraco.codeplex.com/WorkItem/View.aspx?WorkItemId=24786 and was able to get it to work.
Basically, you need to add
<location path="Site Description">
<system.webServer>
<httpErrors existingResponse="PassThrough" />
</system.webServer>
</location>
to your applicationHost.config file where "Site Description" is the name of your site in IIS7.
Hope this helps.
--
Donald
Thank you Donald,
I had the same problem :-)
Cheers
/Dennis
I had the same problem on a shared host.
You can also insert in web.config under <system.server>
<httpErrors existingResponse="PassThrough" />
No need to change applicationHost.config file
Thanks for the tip Christian.
I added
<httpErrors existingResponse="PassThrough" />
as the last entry in the <system.webServer> section (not system.server) and it worked great!
Thanks!
Mark
I just stumbled onto this issue as well, and doing the steps above solves my issue ... almost.
it works for the following:
This works for me on both aspx and static file 404 errors:
Hi jc,
Visually your solution works, but there are 2 down-sides to it:
1. The original url is replaced by the url to the 404 page. No biggy, but it's nicer to show the visitor the actual url that does not exist.
2. More problematic is the underlying status code that you are returning. In this solution you get the visual 404, but if you check in e.g. FireBug you will see that it actually returns a 302 redirect which in turn gives the 404 page with a status code 200 OK. This is ok for ordniary vistiors but bots and google do not process redirects and scripts and will probably interprete the non existing page as existing but with a temporary new location.
So, unfortunately I am still looking for a 'true' solution.
Does anybody know why with pass-through mode I get a blank page for static files?
Is there a way to break into that process and make it redirect elsewhere?
Sandor
Sandor,
Hi jc,
You are very right. I noticed it later on when testing it again. I think I'd playing around with the error settings for too long and sort off lost track on what was and was not working. Thanks for replying though, makes be extra sure about the current implmentation.
S
Hi guys... I've stumbled upon this during me trying to solve the same issue... On windows server 2088 with iis7 I'm getting the respose.status = 200! I can see that you are on iis7.5 from the screen grab... any suggestions?
So rather than rely on the web.config to sort my 404, I tried to get the umbraco handle404 or a custom 404handler to sort my .htm not found files.
Starting point was
and
then
That gets me as far as stopping iis handling htm as StaticFile handler mapping...
However, even though now I get the asp.net server errror, for the 404 not found .htm file I still can;t get umbraco to handle it via the managed Handler...
Any gurus out there who can point me in the direction of an alternative to type="System.Web.UI.PageHandlerFactory" so that it gets passed to the correct umbraco handler... everything I've tried doesn't implement the IHttpHandler :-(
Hi,
I have followed what is written here and updated the following:
in umbracoSettings.config I have:
<errors>
<!-- the id of the page that should be shown if the page is not found -->
<!--<error404>
<errorPage culture="default">1</errorPage>
<errorPage culture="en-US">200</errorPage>
</error404>-->
<error404>11550</error404>
</errors>
in Web.config I got:
<system.webServer>
<httpErrors existingResponse="PassThrough"/>
</system.webServer>
I anticipated that with these simple settings, my 404 would be set.
this DOES work for http://www.myDomainName.com/random_chars_what_so_ever,
but DOES NOT work for this scenario:
if I have this valid url: http://www.myDomainName.com/5592/CountriesHotels/
but request this: http://www.myDomainName.com/5592/CountriesHotels/random_chars_what_so_ever
I get an ugly 404 page which is not the one I set and defined in the configs.
further more if I request an image file that does not exist like this: http://www.myDomainName.com/5592/CountriesHotels/bogus_image_file.gif
I get an error message on my page, saying that the image cannot be displayed because it contains errors.
I anticipated for my defined 404 page.
is there some thing that I have neglected in the configuration?
I'm using Umbraco 6.1.2 and my defaultRenderingEngine is set to MVC
vic.
is working on a reply...