Try our conversational search powered by Generative AI!

404 instead of CMS login?

Vote:
 

Hi,

Our site currently redirects to the EpiServer login if a user attempts to access linked content that has been moved to the recycle bin. Is it possible to change this behaviour so that users see a 404 instead?

Thanks!

#45213
Nov 02, 2010 16:19
Vote:
 

Here is what I did to get this to work property.  In my base page, i overrode the OnInit Function

protected override void OnInit(EventArgs e)
        {            
            if (CurrentPage.ParentLink ==PageReference.WasteBasket)
            {               
Response.Redirect("~/404.aspx");
            }
            base.OnInit(e);
        }    

Not sure if it is the best method but it works for our system.

#45216
Edited, Nov 02, 2010 16:32
Vote:
 

You could do this as a PagePlugin too, if you don't have a base page.

#45217
Nov 02, 2010 16:37
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.