3

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?

example:

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

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

6
  • which sharepoint version you are asking?
    – Waqas Sarwar MVP
    Commented Oct 22, 2014 at 15:42
  • in SharePoint 2013 :) Commented Oct 22, 2014 at 15:46
  • check this one sharepoint-community.net/profiles/blogs/…
    – Waqas Sarwar MVP
    Commented Oct 22, 2014 at 15:49
  • Did you mean re-direct? If so, perhaps this might help you. I'm sorry if I have misunderstood your question!
    – user34494
    Commented Oct 22, 2014 at 15:53
  • thank you,the page exists, I just need to go to it, for code, following given conditions Commented Oct 22, 2014 at 15:58

2 Answers 2

1

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

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

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

0

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 and acknowledge you have read our privacy policy.

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