Friday 23 May 2014

How to set custom login page replacing the OOB login page in sharepoint 2010?

We need to follow the below steps to apply custom login page replacing the OOB application page.

Steps:

1) Create a new Application Page and name it based on your choice(for example default.aspx)

2) Deploy this Application Page in to a different folder under Layouts, so that it wont conflict with OOB default.aspx page in the layouts folder

3) Once the page is deployed run the below powershell command/code /script to set the custom page as the login page

$WebAppURL= read-host "Enter the web application URL to which wish to set the Custom Login Page"
Set-SPCustomLayoutsPage -Identity "Login" -RelativePath "/_layouts/Login/Default.aspx" -WebApplication $WebAppURL


4) Modify the web.config file to change the login page URL as below.

   <authentication mode="Forms">
      <forms loginUrl="/_layouts/login/default.aspx" />
    </authentication>


The above steps would automatically set the new custom login page.

No comments:

Post a Comment