so here's what my RouteConfig looks like:
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapRoute("Robots.txt",
"robots.txt",
new {
controller = "Home",
action = "Robots",
id = "",
language = "en",
culture = "us"
});
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default",
"{language}/{culture}/{controller}/{action}/{id}",
new
{
controller = "Home",
action = "Index",
id = "",
language = "en",
culture = "us"
});
}
}
Now according to my understanding, The site should route to robots.txt when I go to www.mysite.com/robots.txt, however it is not. I also had problems serving another static page, but I found a workaround and didn't have to serve the static .html page.
I have built another site in MVC3 and I've copied the route config patterns I used there and they seem to work fine. Any ideas why this would not work?
P.S. I see the robots.txt file just fine when I browse to www.mysite.com/en/US/Home/Robots so all the controllers, actions, & views are matching up just fine.
Thanks!