Hello all,
I'm trying to do the following with no success: Redirect a page request to a subdirectory of a website. So for instance, when someone enters the URL of http://subdomain.somesite.com I want it to redirect to www.somesite.com/subdomainfolder/index.aspx.
The code I am using is traditional ASP code embedded in the default document of www.somesite.com. Here it is:
<%
If InStr( Ucase(Request.ServerVariables("SERVER_NAME")), Ucase("http://subdomain.somesite.com") ) > 0 Then
Response.Redirect("http://www.somesite.com/subdomainfolder/index.aspx")
End if
%>
This is the second line in my index.aspx page for the main website. The Response.redirect fires when it is isolated but when I type in the subdomain.somesite.com, noting fires.
Does anyone have any ideas or am I using ASP code that won't work in ASP.NET?
thanks in advance.
inzo
I'm trying to do the following with no success: Redirect a page request to a subdirectory of a website. So for instance, when someone enters the URL of http://subdomain.somesite.com I want it to redirect to www.somesite.com/subdomainfolder/index.aspx.
The code I am using is traditional ASP code embedded in the default document of www.somesite.com. Here it is:
<%
If InStr( Ucase(Request.ServerVariables("SERVER_NAME")), Ucase("http://subdomain.somesite.com") ) > 0 Then
Response.Redirect("http://www.somesite.com/subdomainfolder/index.aspx")
End if
%>
This is the second line in my index.aspx page for the main website. The Response.redirect fires when it is isolated but when I type in the subdomain.somesite.com, noting fires.
Does anyone have any ideas or am I using ASP code that won't work in ASP.NET?
thanks in advance.
inzo