Home : ASP :
How do I set multiple domain or subdomain without using my website limits.

Category : ASP

For multiple domain to work correctly, you have to set domain pointer for your site.
For.eg, you want to set
domain.com, and test2@domain.com pointing to different folders in your websites.

Login to Control Panel, and create a domain pointer for your main websites.
Add 
test2@domain.com as domain pointer.
And then in your home directory, you have to create 1 new folders to host your subdomain. Just called it test2
Remember to create the folder inside the public_html on that domain name.

After that, in your domain.com's index. asp or default document, you have to add this code.
If Trim(Request.ServerVariables ("HTTP_HOST")) = "
test2@domain.com" Then
    'Redirect to test2 folder (Remember to put index.asp inside the folders)
    Response.Redirect ("test2")
Else
    'Do nothing.
End if

 

 


Created : 18 Mar 2005
Modified : 18 Mar 2005
Viewed : 1565 times.
Print Article