PDA

View Full Version : Getting index.asp served as default file


dzechiel
10-17-2010, 09:00 PM
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

mjp
10-18-2010, 12:45 PM
IIS is serving up index.html first, instead of index.asp first.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 (https://my.discountasp.net/web-manager/iis6-defaultdocs.aspx).

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

dzechiel
10-18-2010, 01:07 PM
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

mjp
10-19-2010, 11:17 AM
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.