404handler
404handler copied to clipboard
Infinite redirect when using [BVNetwork.NotFound.Core.NotFoundPage.NotFoundPage] Attribute
I am using the [BVNetwork.NotFound.Core.NotFoundPage.NotFoundPage] attribute on our ErrorPage controller action in Episerver 11 so that the response type is 404 instead of 200. However, when I use this attribute, it causes an infinite redirect. In our web.config we are using errorMode="Custom" existingResponse="Replace" for httpErrors. What could be causing the infinite redirects? If I manually set the response type to 404 instead of using the attribute, I still get the infinite redirects. It seems like 404 handler is catching the 404 error again and again.
@KidMojo What version of 404 handler are you using?
Hey @marisks , Can't believe I just found this. We are also annotating our controller with the not found attribute and our 404 pages are stuck in a redirect loop. We've just pushed version 11.4.0 into production and discovered this. Very odd as we are not seeing the same issue on inte or prep! Any thoughts on what could be causing this?
With the help of EPiServer support we managed to fix our issue. The resolution was to remove all custom redirects, clean up the exported xml (in terms of removing a load of unneeded / old entries) and importing the result into the manager. We went from 5003 custom redirects down to 4427 and everything is working again now.