2

I'm developing an ASP.Net MVC application in C#, and it is hosted in an IIS server. Right now the client asked me to have a CMS on the same app url, that will be used to serve the public pages.

I have looked for ASP.Net MVC CMS apps and could not find anything that would be easily integrated with the current application, so I choose to do it by changing the server configuration.

What I need is:

Custom App:

  • exampleappurl.com/User

  • exampleappurl.com/Company

  • etc

CMS:

  • Any other URL, including "index" (exampleappurl.com)

Can I do it using any kind of Rewrite rule? Or IIS configuration? What is the best solution?

Thanks in advance!

1 Answer 1

1

On IIS6, there is a feature called 'host headers', that does exactly this: several websites may share the port 80, and the request goes to one of the sites its URL points to.

http://www.it-notebook.org/iis/article/understanding_host_headers.htm

http://technet.microsoft.com/en-us/library/cc753195(v=ws.10).aspx (this one is about IIS 7)

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

2 Comments

Hi. Thanks for your answer. I may have missed something, but when I followed the instructions on the second link (for IIS7), I could only set one app for using the port 80. When I try to setup the other one, it gives me an error, saying that I can only start one website using that port. May I have missed something?
I didn't set up IIS7 myself, but I think there's an 'advanced' button, and you can click that and set up multiple listeners on port 80 this way.

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.