Mobile app version of vmapp.org
Login or Join
Miguel251

: Http://www.mysite.com/c/v to display different domain:http://www.myothersite.com/c/v My site is written in asp.net using C#/MVC 4.5, and is hosted on Windows Server 2008, IIS7. # It has the following

@Miguel251

Posted in: #Iis7 #UrlRewriting #WindowsServer2008

My site is written in asp.net using C#/MVC 4.5, and is hosted on Windows Server 2008, IIS7. #

It has the following route mysite.com/c/v. When the user types in www.myothersite/c/v, I want it to redirect/route to mysite.com/c/v, however, I want the route in the client's browser to display www.myothersite/c/v.

We obviously own both domain names, and, we own the web server that hosts mysite.com, and define the bind to myothersite will be on the same web server. Is this possible?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Miguel251

1 Comments

Sorted by latest first Latest Oldest Best

 

@Si4351233

Based on what I can gather from your question you are wanting to serve the same site from both domains, but don't want to be redirecting from one domain to another. In that case what you referring to isn't a redirect or a route but rather is a site binding. To do this in IIS is very easy and doesn't involve changing your code should you not wish to. The following steps should help you...


Log into your Windows server
Click Start > Administrative Tools > Internet Information Services (IIS) Manager
Click the plus sign next to your server to expand it
Right click in the site you wish to add the binding or alias to and click on "Edit Bindings"
Click on the "Add" button
Here you can select the protocol (HTTP/HTTPS) and then select the IP address and port. Under host name enter the alternate domain name you want to bind to your site...

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme