This is really off-topic and I apologize for posting it in advance. But, knowing the friendly nature of all the community members, I wanted to give it a shot.
I have a pilot site that I'm working on that will eventually make it into Umbraco once the POC has been done, but for now, I have to "simulate" having multiple domains go to different "landing" pages. I have tried a couple of things using URL Rewrite without any particular success and honestly have not found any hits on google (specific to this case).
At it's simplest, I would like to have differnt domains have different "Default Documents". Is canonical domains what I am looking for? So,
if it is just the default document you want to choose/switch based on hostname you could just create a /default.aspx page which redirects to either default1.aspx or default2.aspx depending on the hostname (get it from the Server.Request object, simple switch statement which then performs Server.Transfer). Not ideal but if you use Server.Transfer it should have as good as no impact on performance. The user will just see http://www.bankdomain1.com or the other one.
This will obviously not work well if you need also the rest of the pages to behave in the same manner. Have you looked into setting up specific rules in IIS7?
This method has to send the domain being forwarded to a different domain, otherwise it loops. The destination domain could be second.secondsite.com, if you can have another domain pointing at the site.
URL Rewrite
This is really off-topic and I apologize for posting it in advance. But, knowing the friendly nature of all the community members, I wanted to give it a shot.
I have a pilot site that I'm working on that will eventually make it into Umbraco once the POC has been done, but for now, I have to "simulate" having multiple domains go to different "landing" pages. I have tried a couple of things using URL Rewrite without any particular success and honestly have not found any hits on google (specific to this case).
At it's simplest, I would like to have differnt domains have different "Default Documents". Is canonical domains what I am looking for? So,
http://www.bankdomain1.com --> Deafult1.aspx
http://www.bankdomain2.com --> Deafult2.aspx
Thanks all for your advice.
-- Nik
Hi Nik,
if it is just the default document you want to choose/switch based on hostname you could just create a /default.aspx page which redirects to either default1.aspx or default2.aspx depending on the hostname (get it from the Server.Request object, simple switch statement which then performs Server.Transfer). Not ideal but if you use Server.Transfer it should have as good as no impact on performance. The user will just see http://www.bankdomain1.com or the other one.
This will obviously not work well if you need also the rest of the pages to behave in the same manner. Have you looked into setting up specific rules in IIS7?
Hope that helps,
Sascha
If you are using the URLRewriting.Net module you could do:
Check http://www.urlrewriting.net/.
This method has to send the domain being forwarded to a different domain, otherwise it loops. The destination domain could be second.secondsite.com, if you can have another domain pointing at the site.
Hello, i've got a similar question that i'm struggling with and hope someone can help
I'm using the url rewrite rules and have multiple domain on the same umbraco installation.
www.domain1.com, www.domain2.com each site contains it's own folder / 'mini-site' in umbraco etc..
the redirect rules are working fine with relative paths but it's not working for full paths for some reason
<add name="test1"
virtualUrl="home/index.htm"
rewriteUrlParameter="ExcludeFromClientQueryString"
redirect ="Application"
redirectMode ="Permanent"
destinationUrl="/"
ignoreCase="true" />
above works fine
<add name="test2"
virtualUrl="http://www.domain1.com/home/index.htm"
rewriteUrlParameter="ExcludeFromClientQueryString"
redirect ="Application"
redirectMode ="Permanent"
destinationUrl="http://www.domain1.com/"
ignoreCase="true" />
above does not work
any ideas?
many thanks in advance
Ed.D
I've discovered the issue.
redirect ="Application"
only works with relative URLs (duh!)
whereas
redirect ="Domain"
works with the full domain path
is working on a reply...