Why server login Prompt and How to redirect to home page of application

adil 1,226 Reputation points
2020-11-23T09:55:05.98+00:00

I have one internet publishing SharePoint Site.
For example i have my site:

https://*****/products/pages/default.aspx when i removed default.aspx from URL in browser it shows authentication for user shown in pic ,
41848-login-page.png

here i required instead of show login prompt how to redirect to home page of site?

SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,605 questions
{count} votes

5 answers

Sort by: Most helpful
  1. sadomovalex 3,631 Reputation points
    2020-11-23T15:00:43.35+00:00

    check in Site settings > Welcome page whether default.aspx page (it's full url) is set as default page for the site

    0 comments No comments

  2. Echo Du_MSFT 17,156 Reputation points
    2020-11-24T03:17:57.6+00:00

    Hello @adil ,

    This may be because your Home page URL link contains /default.aspx

    Pelase follow steps:

    1.Check the Welcome Page URL
    Go to SharePoint site's Site Settings >> Welcome Page >> check the URL of Welcome Page whether includes /default.aspx ?
    42063-note.png

    42064-publish.png
    42044-publishing.png

    2.Change Home page using PowerShell:

    Add-PSSnapin Microsoft.SharePoint.PowerShell –ErrorAction SilentlyContinue  
    
    #Variables  
    $WebURL="http://intranet.crescent.com"  
    $HomePageURL="SitePages/Home.aspx"  
    
    #Get the Web  
    $web = Get-SPWeb $WebURL  
    
    #Change Welcome page  
    $RootFolder = $Web.RootFolder  
    $RootFolder.WelcomePage = $HomePageURL  
    $RootFolder.Update()  
    
    $web.Dispose()  
    

    You could refer to the following article to learn more information:

    Have a nice day!

    Thanks,
    Echo Du

    =======================

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. adil 1,226 Reputation points
    2020-11-24T11:46:30.327+00:00

    Hi there is already home page set in welcome page settings, what i want is authentication prompt should not show to user when anybody remove page name from url like i said above

    0 comments No comments

  4. adil 1,226 Reputation points
    2020-11-24T13:31:12.053+00:00

    Hi is there any option for URL rewrite from IIS?

    if any request will come to for example

    https://mywebsite/products/pages/
    https://mywebsite/news/pages/
    https://mywebsite/company/pages/

    redirect to
    https://mywebsite/products/pages/default.aspx page


  5. adil 1,226 Reputation points
    2020-11-26T07:28:37.03+00:00

    HI My requirement is login prompt should not show to anonymous users and also anonymous users should not view any pages library and _layouts folder pages.

    just i want to redirect to home page instead of showing login prompt because this site is published to internet and for security reasons (possibility to brute-force-attack for example) we don't want to show login prompt to users


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.