Tuesday, 11 March 2014

How to point to a custom 404 error Web page in Microsoft SharePoint Server 2010?

How to point to a custom 404 error Web page in Microsoft SharePoint Server 2010?
1- Log on to the computer that is running SharePoint Server 2010 by using an account that has administrative permissions.
In Windows Explorer, locate the following folder:
%systemdrive% \Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\LangID
LangID: 1033 for English, 1025 for Arabic
2- Create the custom HTML file:
On the computer that is running SharePoint Server 2010, copy the Sps404.html file to a temporary folder.
Rename the Sps404.html file. For example, give the file the following name:
Custom404.html
Add the custom content to the Custom404.html file by using an HTML editor.
3- Copy the Custom404.html file to the %systemdrive% \Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ LangID folder.
4- Run the following PowerShell command from the SharePoint 2010 Management Shell:
(Get-SPWebApplication http://:).FileNotFoundPage = "Custom404.html"
5- Verify that the property is set by running the following command:
(Get-SPWebApplication http://:).FileNotFoundPage