Expired page

Vote:
 
When a visitor tries to access a page whos publish date has expired it gets redirected to the login screen. I would like to redirect the visitor to a 404 page. Is there a way to fix this? Add a exception handler?
#12518
Mar 25, 2008 18:35
Vote:
 
Is there no one who has an answer to this? EP?
#14413
Mar 25, 2008 18:44
Vote:
 
The problem is (as far as I can see), there is no exception when EPiServer sees that the page is not published, just a redirect. The redirect is done inside the PageBase.AccessDenied method, which is virtual, and thus overrideable by you (good news :-) ). However, when invoked, you won't know for what reason it was invoked. You could check the start/stop publish dates and return a 404 status. I believe you can use the PageData.CheckPublishedStatus(PagePublishedStatus.Published) method for checking this. /steve
#14414
Mar 25, 2008 18:44
Vote:
 
We have solved this problem previously by having a custom login page that checks if the user has come from the edit or admin urls. If not, it redirects to the 404 page (this assumes that the only way they access the login screen is via the edit or admin urls ofcourse)
#14415
Mar 25, 2008 18:44
* 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.