I’m developing an ASP.MVC 3 project on my local computer where it is located at the root of the local web server.
localhost:12345/(project is here)
However, when I deploy to our public web server this application will be located in a subfolder
www.mycompany.com/myapp/(project goes here)
How do I deal with that mismatch? A few questions come to mind:
-
Do I need to adjust my MVC routes? Or will they just capture anything after /myapp/ ?
-
Do I use HomeController when I don’t really want ‘Home’ to appear in the route? i.e. /myapp/home/(action)/(id) – rather I want this: /myapp/(action)/(id) if Home is the controller.
-
Should I match this folder structure on my local machine? (This project will never have access to anything outside that ‘myapp’ folder)
-
If 3 is yes, how?
I’m using VS 2010 with IIS Express locally.
1 Answer