JustJo
01-28-2009, 01:00 AM
I hope someone can help me. I am just learning how to use ASP with Visual Studio and I am having a lot of trouble trying to make a subdomain work. Until this day, aslong as a subdomain is added correctly into a server it works without anything to do from the user part (subdomain.domain.net)but with discountasp the story is different: I am told that in order for it to work I have to add a scriptto my default page, which can contain nothing but the script, and it's the script that will call the requested URL by any user.
This is thescrip:
The following is a sample script that you can use to redirect a subdomain. You will need to place it as default document on your document root.
<%
If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain1.YourHostedDomainName.com") ) > 0 Then
Response.Redirect("/subdomain1")
ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain2.YourHostedDomainName.com") ) > 0 Then
Response.Redirect("/subdomain2")
ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain3.YourHostedDomainName.com") ) > 0 Then
Response.Redirect("/subdomain3/home.asp")
End If
%>
When I asked for help they told me they don't offer any help with scripts and I should try the forum.
The original site (http://iphix.net) is at a different server right now but I have to change because they don't offer ASP hosting and it's a must that I make the transition to asp.net, and I do have the subdomain (http://gl.iphix.net) working without any problem (very lousy design).
I have copied everything to the new server and thetest website is at http://iphixnet000.web703.discountasp.net/The test subdomain is at http://iphixnet000.web703.discountasp.net/gl/The subdomain (when it finally goes online) should be gl.iphix.net but I can't make the change from one server to the other until I am totally sure it will work because most users call the subdomain URL in order to access it and it's quite busy
Iknow you guys are experts and I am just trying to design and makethis website work and put it online, so I need someone's help!!
My questions are:
Should the default page be default.aspx or can it be index.aspx?
Can the extension be .aspx or it must be .asp?
Does it go on the <head> part of the page?
How should I enclose the script? Would <script type="text/C#"></script> work?
I am not sure if I make any sense, I would really appreciate any help I can get.
Thanks a lot
This is thescrip:
The following is a sample script that you can use to redirect a subdomain. You will need to place it as default document on your document root.
<%
If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain1.YourHostedDomainName.com") ) > 0 Then
Response.Redirect("/subdomain1")
ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain2.YourHostedDomainName.com") ) > 0 Then
Response.Redirect("/subdomain2")
ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain3.YourHostedDomainName.com") ) > 0 Then
Response.Redirect("/subdomain3/home.asp")
End If
%>
When I asked for help they told me they don't offer any help with scripts and I should try the forum.
The original site (http://iphix.net) is at a different server right now but I have to change because they don't offer ASP hosting and it's a must that I make the transition to asp.net, and I do have the subdomain (http://gl.iphix.net) working without any problem (very lousy design).
I have copied everything to the new server and thetest website is at http://iphixnet000.web703.discountasp.net/The test subdomain is at http://iphixnet000.web703.discountasp.net/gl/The subdomain (when it finally goes online) should be gl.iphix.net but I can't make the change from one server to the other until I am totally sure it will work because most users call the subdomain URL in order to access it and it's quite busy
Iknow you guys are experts and I am just trying to design and makethis website work and put it online, so I need someone's help!!
My questions are:
Should the default page be default.aspx or can it be index.aspx?
Can the extension be .aspx or it must be .asp?
Does it go on the <head> part of the page?
How should I enclose the script? Would <script type="text/C#"></script> work?
I am not sure if I make any sense, I would really appreciate any help I can get.
Thanks a lot