Created
August 12, 2021 15:42
-
-
Save bjoerntx/7b17c28f7e737cedb5d6dfd4264988eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Routing; | |
using Microsoft.AspNet.FriendlyUrls; | |
namespace webforms_js_viewer | |
{ | |
public static class RouteConfig | |
{ | |
public static void RegisterRoutes(RouteCollection routes) | |
{ | |
var settings = new FriendlyUrlSettings(); | |
settings.AutoRedirectMode = RedirectMode.Permanent; | |
routes.EnableFriendlyUrls(settings); | |
routes.MapRoute( | |
name: "Default", | |
url: "{controller}/{action}/{id}", | |
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } | |
); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment