Take these two domain names as examples:
http://www.downcodes.com/
http://code.knowsky.com/
These two domain names are tied to the same space, haha, but they will jump to different directories. It is not implemented on the IIS settings, it is just a small piece of ASP code, haha. . . The code is given for everyone to take a look at. Although it is not something profound, it is quite practical.
Code: The following is a quoted fragment:
<%
'Get the value of the HTTP input and put it into HTOST host=lcase(request.servervariables("HTTP_HOST"))
'Start conditional jump SELECT CASE host
' If the value of HOST is code.knowsky.com/, select the command CASE "code.knowsky.com/" of the event case "code.knowsky.com/"
' Below is the redirect command
response.redirect "homepage/"
CASE " www.downcodes.com "
response.redirect "/"
'We use CASE ELSE to fix any other requests
CASE ELSE
response.redirect "/"
END SELECT
%>