I have created and host nvc3 web app
now problem is when I open my www.abc.com
it is opening index.cshtml i.e home page of mvc web app
but I dont want that to be open when I open www.abc.com
I have one static page called index.htm should be open first
in mvc3 Global.asax code:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
}
How can I render to http://www.abc.com/mypage.html ?
what should I please help.
ashuthinks,
Based on your revised comments for the question. If you just want to show the ‘Under contruction’ type page with no links, then you can modify the
web.configand add anapp_offline.htmfile. here’s what those changes would look like:web.config (bare bones):
app_offline.htm:
when you need to put the site live, simply rename the above files to
web.config_offlineandapp_offline.htm_offlineand bring your ‘normal’ web.config into play. There are of course many ways to skin this cat but this has worked well with previous projects that I’ve worked on.see:
http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx
for further details.