I am not normally a programmer or IIS admin - however the person who used to do this for my company recently left and has not been replaced yet. I have experience scripting primarily in classic VB (and powershell and many many years ago took a class on C#) but no experience with .NET.
We have multiple Web Applications being hosted on one Site. The way we have done this on classic ASP pages is by using the following code to forward people from the URL they type to the correct location:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Page = ucase(replace(Request.ServerVariables("SERVER_NAME"), ".domain.com", ""))
if Page = "page1" then
response.redirect "/Page1"
elseif Page = "Page2" then
response.redirect "Page2"
end if
%>
<html>
<head></head>
<body>
Test page
</body>
</html>
What happens is if someone types in Page1.Domain.com they are sent to the correct Virtual Directory in IIS (which is domain.com/Page1) - same for Page2.
Now I need to take that same idea and apply it to a Site that is using .NET 4 application pool instead of ASP. or if there is a better way to do this in IIS I am open to suggestions there as well.
Thank you all for any help that can be offered. If something didn't make sense please let me know and I will try to further explain.
We have multiple Web Applications being hosted on one Site. The way we have done this on classic ASP pages is by using the following code to forward people from the URL they type to the correct location:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Page = ucase(replace(Request.ServerVariables("SERVER_NAME"), ".domain.com", ""))
if Page = "page1" then
response.redirect "/Page1"
elseif Page = "Page2" then
response.redirect "Page2"
end if
%>
<html>
<head></head>
<body>
Test page
</body>
</html>
What happens is if someone types in Page1.Domain.com they are sent to the correct Virtual Directory in IIS (which is domain.com/Page1) - same for Page2.
Now I need to take that same idea and apply it to a Site that is using .NET 4 application pool instead of ASP. or if there is a better way to do this in IIS I am open to suggestions there as well.
Thank you all for any help that can be offered. If something didn't make sense please let me know and I will try to further explain.
