Ok, so I have one root directory folder.
But I have 2 domain names pointing to the same root directory folder. Like:
1) mydomain.com points to wwwroot
2) subname.mydomain.com points to wwwroot
Is it possible that I can have some code in webconfig that redirectors to another domain names based on which request is coming?
Conditions:
If a user visit mydomain,com then redirect to newsite1.com
if a user visit subname.mycomain then redirect to newsite2.com
Currently I am using condition for one domain name only that redirect the user, here is the code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rule name="Canonical Host Name" stopProcessing="true">
<matc ...
Go to the complete details ...