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

Multiple 404-pages when using BN 404-module

Vote:
 

Hi

I am using the EPiServer 404-module (https://www.coderesort.com/p/epicode/wiki/404Handler) and it seems to be working correctly.

However, I want to use two different 404-pages for the following scenarios:

1) Page not found (standard 404 scenario)

2) Page used to exist, but is no longer available

 

In my 2) scenario I have the following code in PageLoad:

if (!PageEditing.PageIsInEditMode)
{
   this.Page.Response.StatusCode = 404;
}

but since the page recieves the 404-Statuscode, the 404-module takes over and I end up on my standard 404-page, 1).

 

Is there any way of having multiple 404-pages?

 

Best regards

Jesper

#81613
Feb 20, 2014 14:05
Vote:
 

The BVN 404 handler is currently a bit tied down to one 404 page (but that might change sooner rather than later). 
How about using status code 410 for your expired content (scenario 2), instead of 404?


http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#410

#81617
Edited, Feb 20, 2014 15:38
Vote:
 

410 should be SEO friendly as well

#81618
Feb 20, 2014 15:38
Vote:
 

Thank you for your suggestion!

Unfortunately, the client requested the 404 response code on the expired content page, but I might try to convince them into using 410 instead.

I thought of another alternative, which would be to use the same 404-page in both scenarios and then programmatically control the layout of the page (through show/hide placeholders).

#81724
Feb 25, 2014 7:46
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.