Search code examples
asp.nethtmliishttp-redirectiis-manager

What is the correct way for redirecting from the domain name itself to a page in a directory?


I want anyone browsing for "MyDomain.com" to see what's in "MyDomain.com/Folder1/HomePage.aspx".

I tried adding a page with <meta http-equiv="refresh" content="0;URL='MyDomain.com/Folder1/HomePage.aspx'" /> but there is a slight delay. I'd rather it is done silently.

I tried using iis-manager's HTTP-Redirect, but all sub-directories inherit it. (And asking here https://stackoverflow.com/questions/13629137/prevent-subdirectories-from-inheriting-an-http-redirect-in-iis about solving that returned mainly silent close-votes.)

So how do I achieve it?


Solution

  • Response.Redirect
    

    Seems to be the best way.