I have specific problem with bad request page e.g. www.site.com/badrequest . After Umbraco proceed those bad page it set http status 302 to the same. This is correct, since it is proceed to IIS which recognize that http status and redirect that bad request to 404 page that is set on IIS level. This makes a problem to search engine and I would like to set http status to those page on 404. I can not find the moment where Umbraco process those bad pages and set them http status on 302. Mine idea is to bypass IIS 404 redirection in that situation in further manner. I would like to intercept moment where Umbraco set http status on 302 and set the same on 404 and then to redirect those bad request to one specific custom error page.
I’ve created a class which implements the umbraco.interfaces.INotFoundHandler interface and set that in Umbraco 404handlers.config, but did not work as it should.
Then I tried to create class which implement IHttpModule interface, but did not work as well.
Does anyone have idea how I can solve this problem?
I' ve implemented several NotFoundHandlers and they are all working well. So which functionality didn't work? Was the NotFoundHandler you wrote touched. Try adding some loginformations in the request eg:
Changing http status of bad request pages.
Hello guys/girls,
I have specific problem with bad request page e.g. www.site.com/badrequest . After Umbraco proceed those bad page it set http status 302 to the same. This is correct, since it is proceed to IIS which recognize that http status and redirect that bad request to 404 page that is set on IIS level. This makes a problem to search engine and I would like to set http status to those page on 404. I can not find the moment where Umbraco process those bad pages and set them http status on 302. Mine idea is to bypass IIS 404 redirection in that situation in further manner. I would like to intercept moment where Umbraco set http status on 302 and set the same on 404 and then to redirect those bad request to one specific custom error page.
I’ve created a class which implements the umbraco.interfaces.INotFoundHandler interface and set that in Umbraco 404handlers.config, but did not work as it should.
Then I tried to create class which implement IHttpModule interface, but did not work as well.
Does anyone have idea how I can solve this problem?
Tnx in advance.
Maja
I' ve implemented several NotFoundHandlers and they are all working well. So which functionality didn't work? Was the NotFoundHandler you wrote touched. Try adding some loginformations in the request eg:
is the sequence in the config correct? First Handler is touched first.
hth, Thomas
is working on a reply...