This project is read-only.

Ignore/Stop Routing?


Trying to do this:
            var settings = new FriendlyUrlSettings
                AutoRedirectMode = RedirectMode.Permanent,
            routes.Add(new Route("handlerorpageorsomething.aspx/{*queryparams}", new StopRoutingHandler()));
Where routes are ignored form my custom page (due to a hard coded module using the specific handler URL.)

Is this even possible? Or does the Friendly URL enabled completely override all my routes?


PatrickSmacchia wrote Aug 26, 2014 at 8:07 AM

Actually ignoring route cannot be composed with ASP.NET Friendly Urls that is internally based on HttpModule. Hence you need to derive from the ASP.NET Friendly Urls code and override the method that redirect path to make it no-op when you can match the path to avoid to redirect.

Here is the related code to make this work: