redirecting directory to a page

Discussion in 'ASP.NET 2.0' started by conrads, Aug 28, 2015.

  1. Thanks to assistance from the board here, I got the private page figured out.

    But my client sends the directory without the trailing slash "" as the link in his printed copy. Now he wants that to redirect to the actual staff page which is ""

    I used .htaccess but found out that I need to use web.config instead because it's IIS and not Unix. So is it possible to redirect a request to a directory to a file inside that directory? I tried the following code but I think I created an infinite loop. This web.config is in the root,


    <location path="intranet">
    <httpRedirect enabled="true" destination="" httpResponseStatus="Permanent" />

  2. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

  3. Thanks! I'll take a look at those and see if I can fix it.
  4. Well, that was overkill.

    Didn't need to redirect it all. Just rename the target html file to index.html and that part is sorted. o_O

    Unfortunately, now the page renders while the User and Password dialog pops up. :confused:
    RayH likes this.
  5. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

    That works too. :)

Share This Page