Try our conversational search powered by Generative AI!

Setting a 404 for a VPP


In the EPiServer.config we have 3 default VPP folders: Documents, Global and PageFiles. We have our error handler setup like the below in the web.config file and this works for any url apart from /Global, /Documents and /PageFiles:

<httpErrors errorMode="Custom" defaultResponseMode="ExecuteURL" >
<remove statusCode="500"/>
<remove statusCode="404"/>

<error statusCode="500" path="/Error/500" responseMode="ExecuteURL" />
<error statusCode="404" path="/Error/404" responseMode="ExecuteURL" />

If you browse to a url using any of the VPP folder names we get the EPiServer 404 page instead of our own custom page, is there a way to force EPiServer to use our 404?


Jul 17, 2012 16:42

Yes. We are having the same issue. Does anyone have suggestions?

Jul 18, 2012 18:52

Try changing your httperrors section by adding existingResponse="Replace" as follows:

<httpErrors errorMode="Custom" defaultResponseMode="ExecuteURL" existingResponse="Replace">



Edited, Jul 19, 2012 16:10

Hats off to David, that works for me!


Jul 19, 2012 16:22

Worked for me too! Thanks so much David for the solution and to Chris for letting me tag along your thread! :)

Jul 19, 2012 17:08
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.