0
votes

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

1

1 Answers

1
votes

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)