November Happy Hour will be moved to Thursday December 5th.

Setting a 404 for a VPP

Vote:
 

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" />
</httpErrors>

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?

 

#60098
Jul 17, 2012 16:42
Vote:
 

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

#60125
Jul 18, 2012 18:52
Vote:
 

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

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

    

 

#60135
Edited, Jul 19, 2012 16:10
Vote:
 

Hats off to David, that works for me!

Thanks

#60136
Jul 19, 2012 16:22
Vote:
 

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

#60138
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.