using System.Web.Mvc; using System.Web.Routing; namespace Kreta.Web.App_Start { public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.IgnoreRoute("{resource}.aspx/{*pathInfo}"); routes.IgnoreRoute("{resource}.ashx/{*pathInfo}"); routes.IgnoreRoute("{resource}.svc/{*pathInfo}"); routes.IgnoreRoute("{*staticfile}", new { staticfile = @".*\.(ico|css|js|gif|jpg|woff|eot|svg|eot|ttf|otf|png|map)(/.*)?" }); /* Minden amiben van .js vagy .css azt ignorálja */ routes.Ignore("{*alljs}", new { alljs = @".*\.js(/.*)?" }); routes.Ignore("{*allcss}", new { allcss = @".*\.css(/.*)?" }); routes.MapRoute( name: Constants.RouteKey.Default, url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); } } }