I am using MVC 1.0 in .NET 3.5 Framework. I have a client who would like the URL to be displayed as www.example.com instead of www.example.com/{controller}/{action}/{id}.
- The server that the site is hosted on is utilizing IIS 6.
- I do not have direct access to this server.
With that in mind, can this be done?
Someone suggested using ISAPI_REWRITE. I've found a few examples but none that actually explain correctly what needs to be done.
Alternatively, if this cannot be done throughout the site. Can it just be done on the Home page?
Below is my routing at the moment:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
// Catch all route
routes.MapRoute(
"Default", // Name
"{lang}/{controller}" + System.Configuration.ConfigurationManager.AppSettings["extension"] + "/{action}/{*values}", // URL - ["extension"] being .aspx for IIS 6
new { lang = "EN", controller = "Content", action = "Index" } // Defaults);
}
Thanks in advance.