I have a website that has two domains pointing to the same content. Let’s call them http://www.domainA.com and http://www.domainB.com where http://www.domainA.com/Page is the same as http://www.domainB.com/Page.
Every page on the site has a number of common navigation links (and others) that are constructed using a mixture of Url.Action and Html.ActionLink calls. The resulting urls are based on the current domain. Because http://www.domainA.com is the primary domain, I would like any links generated from http://www.domainB.com to be based on http://www.domainA.com.
Can this be done centrally, rather than me going around the whole site and hard-coding it?
Thanks,
Alan
I ended up using the solution here to instruct IIS to rewrite requests to my old domain.
Hope this helps others with the same requirement.
Alan