Saturday, 5 July 2014

How to Customize Error Page, Page Not Found and Access Denied in SharePoint 2010


First create three pages and place them in this path
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\
Custom_Error.html
Custom_NotFound.html
Custom_AccessDenied.html
Note: if you have multilingual site you need to place these pages in their language folder for example for Arabic
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1025\
Second Open SharePoint 2010 Management Shell with Farm Administrator User
Now For Custom page Not Found runs the following Power Shell:
$webApp = Get-SPWebApplication http://test
$webApp.FileNotFoundPage = “Custom_NotFound.html”
$webApp.Update()