Getting index.asp served as default file

Discussion in 'Hosting Services / Control Panel' started by dzechiel, Oct 17, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. OK, I have two domains that are both pointing to the same site here at DiscountASP.NET. These domains are both quite old and only recently have been moved here.

    Domain A.com is fine. Domain B.com used to point to a subdirectory of domain A.com at their previous host site. So if you went to http://A.com you got

    http://A.com/index.html

    If you went to http://B.com you actually ended up at

    http://A.com/sub/index.html

    Now I have moved the whole site here and found out that this cannot be done for me for some reason, but that I will have to use redirects. Good enough, I can do that. So I wrote up this file

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
    <html>
    <head>
    </head>
    <body>
    <%
    If InStr(UCase(Request.ServerVariables("SERVER_NAME")), UCase("B.com") ) > 0 Then
    Response.Redirect("/sub/index.html")
    Else
    Response.Redirect("/index.html")
    End If
    %>
    </body>
    </html>

    and saved this file as index.asp and put it in the root of A.com. This would work fine, except IIS is serving up index.html first, instead of index.asp first.

    When I asked tech support to please make index.asp my default file, I was told

    "Unfortunately we cannot change this on our end. You'll need to change this and re-upload it."

    Does anyone know

    a) what they are saying here, or better still...
    b) a solution to my problem

    Thanks in advance for your help.

    Sincerely,

    Dave Zechiel
     
  2. mjp

    mjp

    What you need to change is the default document list so index.asp is at the top. If the account is on an IIS6 server you can do that in Control Panel.

    If the account is on an IIS7 server you can do that using IIS Manager.
     
  3. Many Thanks!

    I don't know why tech support couldn't have told me the same thing! I made the change and now have the behavior I want.

    Let me know if you need any help with chess (my strongest suit).

    Dave Zechiel
     
  4. mjp

    mjp

    Sometimes they get caught up in the complicated scenarios and overlook the simple things. It's a hazard of the job, unfortunately.

    And thanks, but I'm way beyond help where chess is concerned.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page