SharePoint Page 404

Is it better to set the 404 error page for SharePoint in the customError section of web.config, or is there a configuration parameter in the site collection / web application?

+5
source share
2 answers

please read this blog

inserted:

  • On your MOSS server, make a copy of% systemdrive% \ Program Files \ Shared Files \ Microsoft Shared \ Web Server Extensions \ 12 \ TEMPLATE \ LAYOUTS \ 1033 \ sps404.html and name it my404.html

  • Create a virtual directory in IIS in the root MOSS web application. For example / errors

  • Create your own aspx redirect page, for example, / errors / my 404redirect.aspx and encode your redirect logic. This is a regular asp.net page.
  • my404.html :       STSNavigate ( "/errors/my404redirect.aspx? OldUrl =" + requestUrl);
  • MOSS

    System.Uri webApplicationUri = Uri (http://MyMOSSServer/);  SPWebApplication webApplication = SPWebApplication.Lookup(webApplicationUri);  webApplication.FileNotFoundPage = "my404.html";  webApplication.Update();

  • , , , .

+4

, , mgith url: http://sharepointsmart404.codeplex.com/ - - 404 , ( )

+1

All Articles