Reputation: 638
I have multiple websites within one Umbraco installation.
I recently deleted a website and wish to re-direct all traffic from that website to a specific page on a different website (within Umbraco).
At the moment, I've setup a template with this macro:
<umbraco:Macro redirectType="[#redirectType]" redirectURL="[#redirectTo]" Alias="GenericRedirect" runat="server"></umbraco:Macro>
It re-directs traffic from www.domainname.com to www.otherdomainname.com/page.aspx.
The only problem is, if a user types in www.domainname.com/anypage.aspx it just gives them a 404 error.
Is there a way to re-direct ALL traffic from www.domainname.com to the page of my choice within Umbraco?
Thanks
Upvotes: 0
Views: 1289
Reputation: 1192
in the config folder is an UrlRewriting.config.
with this file you can redirect a complete site to another domain:
Example (not tested)
<add name="domain1.com redirect"
redirectMode="Permanent"
redirect="Domain"
ignoreCase="true" rewriteUrlParameter="ExcludeFromClientQueryString"
virtualUrl="http://www.domain1.com/(.*)"
destinationUrl="http://www.destinationdomain.nl/" />
(the virtualUrl is a regex)
Upvotes: 1