28 lines
816 B
C#
28 lines
816 B
C#
using Microsoft.AspNet.FriendlyUrls;
|
|
using System.Web.Mvc;
|
|
using System.Web.Routing;
|
|
|
|
namespace MP_IO
|
|
{
|
|
public class RouteConfig
|
|
{
|
|
#region Public Methods
|
|
|
|
public static void RegisterRoutes(RouteCollection routes)
|
|
{
|
|
var settings = new FriendlyUrlSettings();
|
|
settings.AutoRedirectMode = RedirectMode.Permanent;
|
|
routes.EnableFriendlyUrls(settings);
|
|
// aggiungo route x gestione controller IOB
|
|
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
|
|
|
routes.MapRoute(
|
|
name: "Default",
|
|
url: "{controller}/{action}/{id}",
|
|
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
|
|
);
|
|
}
|
|
|
|
#endregion Public Methods
|
|
}
|
|
} |