I belive you can override method AccessDenied from any template (or your own base class for your templates).
Wow excellent! Problem solved!
Thanks very much Per!
Karl, I would also suggest that you instead of the 404 point the user to a 410 page. This way, the unpublished page will disappear much faster from search engines! 404 is not a bad choice though.
Really? I didn't know that! I'll look into that too, thanks Henrik.
Well, maybe I should clarify that so that it doesn't get any unwanted outcomes, cause you might actually want to use a 404 if that matches what you or your client wants.
A 410 will work as a more permanent and immediate 404 for search engines. If you serve a 404 the search bot will continue to visit that url for a while to ensure that it is really gone. A 410 will trigger an immediate removal of the page as you explicitly stated that it is gone.
So if there is a chance that pages will be re-published maybe a 410 is a bit harsh :)
Read more about this at http://www.google.com/support/forum/p/Webmasters/thread?tid=1bc5206b5e0fac47&hl=en
I've got a page with the page stop property set to expired. When I visit this page as a logged out visitor, I get redirected to the login page, where, when you log in, you can then view the page.
What I'd like to do is instead point the user to the 404 page. Is there a way I can do this? Do I need to inherit something to override where it's redirecting to?
Thanks for any help!