1

I'm pretty new to ASP.NET MVC and I just want ask of this scenario is possible and, if so, could anybody provide any resource links on how to implement it.

Say I have a site that can be accessed from www.mysite.com, can I also have the same site load up through www.mysite2com, www.mysite3.com and so on? effectively providing the ability to run multiple sites from a single code base?

The idea is to have the site content and style sheet change depending on site visited but keep the structure the same.

thank you very much for any help you can provide :)

Kris

1 Answer 1

2

Yes, this is possible

http://web.archive.org/web/20100119084358/http://just3ws.wordpress.com/2010/01/03/skinning-your-asp-net-mvc-application-based-on-your-sub-domain

This example uses subdomains of the same domain but nothing stops you from using the same logic and have different images/CSS/paths etc generated based on full HOST/domain name

Sign up to request clarification or add additional context in comments.

3 Comments

@DimitryK sorry that I down voted your answer - but the link you supplied is only accessible to registered users. I feel that this is not the way to answer a question. I do not want to register to a site just to read an answer!
Fair enough. This blog article was available to everyone when I posted this link. Now we get this error "was marked private by its owner". So apparently the owner of this blog doesn't want his articles to be available for unregistered users.
I've provided an edit to an archived version of the post and removed my downvote.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.