Northumberland
asked on
Help re-directing web pages
If you have a server running IIS, can I have a default asp or html page that does something depending upon the URL the user typed into IE to access it. For example, if the user typed http://server.xyz.com the page does nothing. If the user typed http://owa.xyz.com the page would re-direct the user to http://owa.xyz.com/exchange
Both http://server.xyz.com and http://owa.xyz.com point to the same IIS IP address.
Both http://server.xyz.com and http://owa.xyz.com point to the same IIS IP address.
ASKER
I know this is going to be a stupid question, but I dont know much about asp. I took the code and pasted it into wordpad and saved it as Default.asp. I placed it under the wwwroot directory.
When I type http://server.xyz.com It just displays the code as text.
Also where do I fing the host headers ?
When I type http://server.xyz.com It just displays the code as text.
Also where do I fing the host headers ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi Northumberland,
as u said u created file with default.asp and put it in <drive>:\Inetpub\wwwroot directory, if it is your local machine and u running application from this then it is not possible to test it on local machine bcoz it is defined as "localhost" so your url to access page should be
if you store your default page in <drive>:\Inetpub\wwwroot then http://localhost/default.asp
if you store your default page in <drive>:\Inetpub\wwwroot\t est then http://localhost/test/default.asp
like that.
you should first deploy on remote machine. if this is the case.
as u said u created file with default.asp and put it in <drive>:\Inetpub\wwwroot directory, if it is your local machine and u running application from this then it is not possible to test it on local machine bcoz it is defined as "localhost" so your url to access page should be
if you store your default page in <drive>:\Inetpub\wwwroot then http://localhost/default.asp
if you store your default page in <drive>:\Inetpub\wwwroot\t
like that.
you should first deploy on remote machine. if this is the case.
If you want to do it as it is now with help of default.asp redirect then use this code in defaut.asp
If (LCase(Request.ServerVaria
Call Response.Redirect("exchang
End If