locked
How to access my default.html without subfolder in my domain RRS feed

  • Question

  • User-775831949 posted

    I developed ASP.Net site using the name "MyApps"

    I deployed it to C:\MyApps on IIS server

    I then registered a site called MySite.com

    Now, I can gain access to MySite.com/MyApps, it points to the default.html in my C:\MyApps

    However, I wish people if type MySite.com (instead of MySite.com/MyApps) will land on this default.html

    What should I do ?

    Thanks

    Wednesday, February 14, 2018 3:25 PM

Answers

  • User-775831949 posted

    OK I found a solution

    I put intepub wwwroot a default.aspx which direct to the landing page inside MyApps

    Thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 15, 2018 3:26 PM

All replies

  • User753101303 posted

    Hi,

    Make sure that MySite has been configured to point to the c:\MyApps folder rather than to c:\

    According to https://docs.microsoft.com/en-us/iis/configuration/system.webserver/defaultdocument/ it would be best to name your document default.htm or index.html.

    Then mysite.com will point to c:\MyApps and as no file is mentioned the web server will search for the first default document he can find and will serve that file...

    Wednesday, February 14, 2018 4:16 PM
  • User-775831949 posted

    Thanks.

    This is the part I dunno how to set:

    Make sure that MySite has been configured to point to the c:\MyApps folder rather than to c:\


    Pls help

    Thursday, February 15, 2018 1:22 AM
  • User753101303 posted

    You created the web site using https://docs.microsoft.com/en-us/iis/manage/creating-websites/scenario-build-a-static-website-on-iis#step-2-add-a-website ?

    At step 5 you have to select in the "Physical path" box the root folder for your web site.

    And so if you select c:\ you have to use /myapps/default.html (and most files are available through your web site !!!=. If using c:\myapps you'll reach this file using /default.html and you are not supposed to be able to "escape" this folder making available on your site only files found under this folder.

    Thursday, February 15, 2018 8:00 AM
  • User-775831949 posted

    OK I found a solution

    I put intepub wwwroot a default.aspx which direct to the landing page inside MyApps

    Thanks

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 15, 2018 3:26 PM
  • User753101303 posted

    Ok so rather than creating a new web site you added a new folder to the existing default web site. If for example you create another folder at the same location it will be actually part of the same site.

    Thursday, February 15, 2018 3:47 PM