how to redirect to "page not found" for code in SharePoint 2013?

To page /page/PageNotFoundError.aspx

Does anyone knows how can I do that?


item.status = rejected
then this.page.redirect = pagenofound.aspx

the page exists, I just need to go to it, for code, following given conditions


You can update the default 404 page for the webapp using powershell

$webapp =Get-SPWebApplication http://<SiteUrl> 
$webapp.FileNotFoundPage = "custom404.html" 

Source: http://www.spdeveloper.co.in/articles/pages/custom-page-not-found-page-sharepoint-2010.aspx


I was looking for something as this

Anyone have a link showing how to do this in shp2013?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.