Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 https://mysite.com/c/v. When the user types in https://www.myothersite/c/v, I want it to redirect/route to https://mysite.com/c/v, however, I want the route in the client's browser to display https://www.myothersite/c/v.

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

share|improve this question
    
Are you sure you want to do this? It sounds like you'll potentially be creating duplicate content issues: webmasters.stackexchange.com/tags/duplicate-content/info – nathangiesbrecht May 6 '13 at 18:25
    
@nathangiesbrecht - I guess that's exactly what I am trying to avoid; the current site is not properly layered and it may be easier to keep this little 1-2 page site under our main site, rather than creating a separate site and quite possibly have to duplicate code. – gangelo May 6 '13 at 18:40
    
I may have misunderstood your question. You want /c/v to be available on myothersite but NOT on mysite.com? Or do you want it to be accessible on both? – nathangiesbrecht May 6 '13 at 18:52
    
@nathangiesbrecht - it doesn't matter if you can access it from either url, but when I go to myothersite.com/c/v, the url must remain myothersite.com/c/v but obviously hit the mysite.com/c/v site code. – gangelo May 7 '13 at 12:51

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...

  1. Log into your Windows server
  2. Click Start > Administrative Tools > Internet Information Services (IIS) Manager
  3. Click the plus sign next to your server to expand it
  4. Right click in the site you wish to add the binding or alias to and click on "Edit Bindings"
  5. Click on the "Add" button
  6. 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...

IIS Add Site Binding Window

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.