Try our conversational search powered by Generative AI!

Expired page

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?
Feb 10, 2006 10:45
Is there no one who has an answer to this? EP?
Feb 17, 2006 9:37
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
Feb 17, 2006 11:15
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)
Sep 24, 2007 3:54
* 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.