views:

102

answers:

1

Let us say I have a url of subdomain.domain.com. Is there a way in ASP.NET MVC to have a url of say otherdomain.com/gotothesubdomain that takes you to subdomain.domain.com? I know that a simple redirect could do it, but I want the url to stay as otherdomain.com/gotothesubdomain.

Any advice would be greatly appreciated and thanks!

A: 

Assuming that you have 2 separate applications then you would need to grab the page as a string and then render it, here are some potential starting points - WebRequest/WebResponse, Html.RenderPartial in the mvc source or you could have a look at JoeyB's article.

It may be helpful to look at Luke Sampsons article that explains how to have multiple sub-domains in one mvc application, may help with your scenario?

AJ