richleah
11-17-2008, 02:16 AM
I have a page at the site rootcalled home.asp. That page has the following script in it:
<%
If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("sitea.com") ) > 0 Then
Response.Redirect("/sitea")
ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("siteb.com") ) > 0 Then
Response.Redirect("/siteb")
Else
Response.Redirect("/sitea")
End If
%>
The script is working great and redirecting to the appropriate subfolder. I have both subfolders marked as .net applications. The problem I am having is that when you go to either domain you also see the subfolder name in the url:
www.sitea.com (http://www.sitea.com) yeilds ==> www.sitea.com/sitea/default.aspx (http://www.sitea.com/sitea/default.aspx)
Basically, the application is looking back to the root folder as the application root instead of looking at the subfolder as the application root. Am I missing a setting in the web.config or something? I am not used to setting up application folders within application folders so this may be a knowledge gap for me. By the way, I do still have an application installed at the root folder level, but with the home.asp file redirecting, that application should not be working.
Any help would be appreciated!!
Richard
<%
If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("sitea.com") ) > 0 Then
Response.Redirect("/sitea")
ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("siteb.com") ) > 0 Then
Response.Redirect("/siteb")
Else
Response.Redirect("/sitea")
End If
%>
The script is working great and redirecting to the appropriate subfolder. I have both subfolders marked as .net applications. The problem I am having is that when you go to either domain you also see the subfolder name in the url:
www.sitea.com (http://www.sitea.com) yeilds ==> www.sitea.com/sitea/default.aspx (http://www.sitea.com/sitea/default.aspx)
Basically, the application is looking back to the root folder as the application root instead of looking at the subfolder as the application root. Am I missing a setting in the web.config or something? I am not used to setting up application folders within application folders so this may be a knowledge gap for me. By the way, I do still have an application installed at the root folder level, but with the home.asp file redirecting, that application should not be working.
Any help would be appreciated!!
Richard