You can redirect a subdomain to a subdirectory by using ASP or ASP.net code.
When the requests are redirected using an ASP file, the URL in the browser for redirected domain will show the correct domain and the directory name where the request is redirecting, you can also redirect the request to the specific file
Ex:
http://subdomainA.yourdomain.com --> http://subdomain1.yourdomain.com/subdomainA
http://subdomainB.yourdomain.com --> http://subdomain2.yourdomain.com/subdomainB
http://subdomainC.yourdomain.com --> http://subdomain3.yourdomain.com/subdomainC/index.asp
The below smaple code can be use to redirect a subdomian. You will need to place it as defult document to your document root.
<%
If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain1.yourdomain.com") ) > 0 Then
Response.Redirect("/subdomain1")
ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain2.yourdomain.com") ) > 0 Then
Response.Redirect("/subdomain2")
ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain3.yourdomain.com.com") ) > 0 Then
Response.Redirect("/subdomain3/home.asp")
End If
%>
Please note
-Please replace susubdomain.yourdomain.com with your actual subdomain URL.
-Replace /subdomain with your actual subdirectory name.