I have two MVC web applications, a www.company.com and a solution.company.com
The website www.company.com include links to solution.company.com/Contact but how can I set
From what you can see in the already existing answers, you're going to need to change your static string hrefs
for something defined in compile time. I think you should follow the previous advises and write different tags for the Web.Debug.config
and the Web.Release.config
, but not to solve your specific situation, mostly to define your connection strings in case you have different database sources for each base.
To solve your specific situation, just use the Url
native MVC helper, and replace your static hrefs for something like, Contact
, where "~/"
stands for your domain root, regardless of which one it is.
Also, given you didn't write any Controller name before "Contact", I'm assuming you have a ContactController in your application and is reaching its Index View with this address.