2
Answers

How do I redirect page in MVC3?

Ask a question
ashish f

ashish f

12y
3.6k
1

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)