Point primary domain to subdirectory

Discussion in 'Site Programming, Development and Design' started by yitz, Jan 12, 2013.

  1. Can the primary domain (not sub-domain or domain pointer) point directly to a subdirectory?

    The Winhost documentation on domain pointers says: "We do not point additional domains to subdirectories." That implies that the primary domain can point to a subdirectory.
    I defined a new application starting point, but the only way I was able to get the domain to go there was by redirecting it using a default aspx file in the root directory. If I don't redirect it, I get a listing of my files in the root directory!

    So I have 2 questions:
    1) How do I get my primary domain address to point directly to a subdirectory without requiring a default asp file and without displaying the subdirectory name in the URL?
    2) Is there a way to block all unauthorized users from ever seeing a list of the files in my root directory?

    Thanks.
     
  2. ComputerMan

    ComputerMan Winhost Staff

    For question 1 I was able to find this web page article that may help you hide the subdirectory in the URL here: http://forums.iis.net/t/1184035.aspx/1

    As for question 2. You can disable directory browsing through IIS Manager. For this you will need to use IIS Manager and connect to your site. Please read our knowledge base article on how to connect to your site using IIS Manager here: http://support.Winhost.com/KB/a628/using-the-microsoft-iis-70-manager.aspx
     
    Last edited by a moderator: Oct 14, 2015
  3. Thanks for your help. I disabled directory listings using IIS manager and I finally got the primary domain to start in a subdirectory using a rewrite in web.config.
    Nevertheless, I'm still confused. From what I understand, the same rewrite solution can be applied to sub-domains and domain pointers. So what is the difference between using the primary domain, a sub-domain or a domain pointer in regards to starting from a subdirectory? :confused:
    The documentation for domain pointers says: "We do not point additional domains to subdirectories." But actually you don't point any domain to a subdirectory. They all require a redirect or rewrite. Is that correct?
     
  4. ComputerMan

    ComputerMan Winhost Staff

    That is correct. If you need your main domain to be redirected to a subdirectory then you will need to do a redirect for it too.
     

Share This Page