0

I am trying to add a custom login page for SharePoint 2016 On-premise application. Below are the steps I followed:

  1. Created one LoginPage.html page for UI.

  2. Copied the page to /16/templates/layouts/ folder.

  3. Central Admin-> Web application -> Authentication Providers -> Selected Custom login URL and gave URL as /_layouts/15/LoginPage.html -> Save

  4. Updated web.config file with below code:

    <authentication mode="Forms">
        <forms loginUrl="/_layouts/15/LoginPage.html" />
    </authentication>
  1. iisreset

Now, when I open the (dev)application URL http://servername:1234/sites/CustomSite, home page is opening, instead of Loginpage.html.

Can someone please help me understand, what I did wrong here?

Note: I created this simple solution, after googling. Any help is highly appreciated!

1 Answer 1

1

This issue got fixed by adding a ~ before /_layouts/

<authentication mode="Forms">
        <forms loginUrl="~/_layouts/15/LoginPage.html" />
    </authentication>

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.