IIS Host Headers

Discussion in 'General troubleshooting' started by Prosonic Studios, Jul 7, 2014.

  1. I have multiple domains that need to point to their respective web apps. What I've done in the past is setup the Host Headers in IIS on each site. Where can I do that at discountasp.net?
     
  2. I have just confirmed that there isn't a Host Headers option in IIS7.

    The recommended method is to use "URL Rewrite".

    The problem is, when I create a top-level rule in URL Rewrite none of the site-level rules run.

    Is this correct: top-level rules in URL Rewrite keep the site-level rules from running or am I doing something wrong?
     
  3. dmitri

    dmitri DiscountASP.NET Staff

    You need to register your additional domain names as the root domain pointers. After you register a domain as the domain pointer, the host header will be created and you will be able to use URL Rewrite module to point your additional domain to a subfolder. Please review this KB article for more information and instructions.
     
  4. Thank you Dmitri. I'm already doing as you suggest. I think I need to be more clear.

    Using URL Rewrite module to point my domains to their respective folders *only* works when placed at the top level:
    [​IMG]

    If I put them at the "Web App level" they don't work:
    [​IMG]

    So I put them at the top level.

    But I have other rules to add too... and putting them all at the top level is going to get ugly, as they propagate down through each Web App (even rules that do not apply to the Web App). I would rather put the rules at the "web app level", as this is going to be a real mess - there's no way to keep the rules organized.

    So here is my question: Why don't rules run at the web app level? Am I doing something wrong or is this by design? If it's by design then why have "Local" entry types? It seems to me if they allow you to enter rules that are "local" to "web app" it should be possible...but they don't run. Why?

    Any insight as to why would be *greatly* appreciated.
     
  5. FrankC

    FrankC DiscountASP.NET Staff

    Yes. This is by design.

    You can stop the inheritence by doing something like this

    <location path="." inheritInChildApplications="false">
    <system.web>
    ...
    </system.web>
    </location>
     
  6. Thank you Frank. Just to be sure I understand.

    You said "Yes. This is by design." when my question was, "So here is my question: Why don't rules run at the web app level? Am I doing something wrong or is this by design?"

    So you are saying that rules don't run at the web app level by design?

    I understand that the propagation would be by design... but the rules not running at app level?

    (thanks for the inheritInChildApplications tip!)
     
    Last edited: Jul 8, 2014
  7. FrankC

    FrankC DiscountASP.NET Staff

    I am sorry.. i think i mistaken the inheritence part.

    Rule should work fine on the application level, I think the problem could be with the rule itself.
     

Share This Page