views:

66

answers:

2

When I loaded up my new website I have some of it using MVC and the other half using static pages.

The first page should be index.html

However when I go to http://domain, it goes directly in to the MVC controller.

It does not go to index.html, even though I have IIS pointing to this page, it might be due to the fact that I am using wild cards from within IIS, as detailed in my blog http://www.bryanavery.co.uk/post/2009/07/02/Deploying-MVC-on-IIS-6.aspx

But I need the first page to go to index.html when I select http://domain

Any ideas?

+2  A: 

You could direct the path to a controller action and return the file like this:

public ActionResult Index()
{
    return File("index.html", "html");
}
Paul
This causes IE8 to go in to download
Coppermill
Oh, I think it should be "text/html" instead...
Paul
Nope, still getting file download :-(
Coppermill
public ActionResult Index(){ return File("index.html", "test/html");}working :-)
Coppermill
A: 

Tell the routing engine to ignore index.html:

routes.IgnoreRoute("index.html");
Patrick Steele