PDA

View Full Version : subdomain issues - page redirection


inzosoftwar
02-26-2004, 05:20 AM
Hello all,

I have the following issue and support suggested that I post it here. I am trying to redirect a subdomain to a subdirectory of my web site using the information provided in article Q10102. I have put the following code in place:

<%
If InStr( Ucase(Request.ServerVariables("SERVER_NAME")), Ucase("http://backtrackhome.inzosoftware.com") ) > 0 Then
Response.Redirect("http://www.inzosoftware.com/backtrackhome/index.aspx")
End if
%>

This does not function when I go to http://backtrackhome.inzosoftware.com - it merely stays on the default web page.

From what I can tell, there is nothing wrong with the code - but I'm not sure.

Anyone got any ideas.

On that same note, can you use a redirection in the same manner to point an entire URL (say www.backtrackhome.com) to the subdirectory?

thanks in advance.

michael

bruce
02-26-2004, 07:41 AM
Code looks good to me. Do you get any error message?

For debugging I would add this

<%
If InStr( Ucase(Request.ServerVariables("SERVER_NAME")), Ucase("http://backtrackhome.inzosoftware.com") ) > 0 Then
Response.Redirect("http://www.inzosoftware.com/backtrackhome/index.aspx")

else
response.write "Failed"
End if
%>


What is the URL to the page?

You'll have to make sure you save it as the ONLY default document in your root.

[b]quote:Originally posted by inzosoftwar

Hello all,

I have the following issue and support suggested that I post it here. I am trying to redirect a subdomain to a subdirectory of my web site using the information provided in article Q10102. I have put the following code in place:

<%
If InStr( Ucase(Request.ServerVariables("SERVER_NAME")), Ucase("http://backtrackhome.inzosoftware.com") ) > 0 Then
Response.Redirect("http://www.inzosoftware.com/backtrackhome/index.aspx")
End if
%>

This does not function when I go to http://backtrackhome.inzosoftware.com - it merely stays on the default web page.

From what I can tell, there is nothing wrong with the code - but I'm not sure.

Anyone got any ideas.

On that same note, can you use a redirection in the same manner to point an entire URL (say www.backtrackhome.com) to the subdirectory?

thanks in advance.

michael
</blockquote id="quote"></font id="quote">

jeromewilson
02-28-2004, 02:11 AM
Request.ServerVariables("SERVER_NAME") does not contain the 'http://' bit - only the 'www.inzosoftware.com' bit.