ashish f

ashish f

  • NA
  • 51
  • 0

How do I redirect page in MVC3?

Feb 14 2012 7:58 AM

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


Answers (2)