Redirect unpublished pages to homepage

Vote:
 

Hi,

In EPiServer, when you try to access an unpublished page, it redirects the user to the EPiServer login page. However is there a way to redirect all access to unpublished pages to the homepage?

Thanks.

#50669
May 09, 2011 17:11
Vote:
 

Not sure if this works for unpublished pages, but I guess it should.

In the page template (or base page template) override AccessDenied() and check if the page is unpublished, if it is, redirect to homepage.

#50723
May 10, 2011 17:03
* 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.