<%EnableSessionState=False

host = Request.ServerVariables("HTTP_HOST")

if host = "test.com" or host = "www.test.com" then
response.redirect("http://domain1.com/domain1/index.aspx")

elseif host = "tranquilhome.com" or host = "www.tranquilhome.com" then
response.redirect("http://domain2.com/domain2/index.aspx")

else
response.redirect("http://domain1.com/error.htm")

end if
%>


With this kind of setup, you can place the codebehind files in a "bin" folder. And
the "bin" folder can then be placed in the respective folders the domain is pointing
to.

For example: the codebehind files for domain1.com can be placed in the folder
domain1. (/domain1.com/bin)

Please note
The web.config can go into the respective folders too.

----------

Where do I place all the CodeBehind files for a .NET Version 2.0?


Ensure all your domains are pointing to the root (/.) and you are redirecting them to different folders using a default.asp script.



<%EnableSessionState=False

host = Request.ServerVariables("HTTP_HOST")

if host = "test.com" or host = "www.test.com" then
response.redirect("http://domain1.com/domain1/index.aspx")

elseif host = "tranquilhome.com" or host = "www.tranquilhome.com" then
response.redirect("http://domain2.com/domain2/index.aspx")

else
response.redirect("http://domain1.com/error.htm")

end if
%>


With this kind of setup, you can place the codebehind files in a "bin" folder. And
the "bin" folder can then be placed in the respective folders the domain is pointing
to.

For example: the codebehind files for domain1.com can be placed in the folder
domain1. (/domain1.com/bin)

Please note
The web.config can go into the respective folders too.