I'm trying to intercept all requests to Umbraco content nodes and send them to my own RenderMvcController.
Here's what I have tried (in IApplicationEventHander OnApplicationStarted):
// Register catch all route
RouteTable.Routes.MapUmbracoRoute(
"CatchAllRoutes",
"{*.}",
new
{
controller = "CatchAll",
action = "Master"
}, new ReactUmbracoVirtualNodeRouteHandler());
This works as a catch-all but isn't specific enough, i.e it breaks those backoffice routes which use .axd and requests for favicon.ico, etc....
The set of routes I want to capture is very specific, and is every route for my content nodes, so it would always be of the pattern /example or /example/2017/05/25/example-post
Registering catch-all route to intercept Umbraco content requests
I'm trying to intercept all requests to Umbraco content nodes and send them to my own RenderMvcController.
Here's what I have tried (in IApplicationEventHander OnApplicationStarted):
This works as a catch-all but isn't specific enough, i.e it breaks those backoffice routes which use .axd and requests for favicon.ico, etc....
The set of routes I want to capture is very specific, and is every route for my content nodes, so it would always be of the pattern
/example
or/example/2017/05/25/example-post
So which is the best pattern for me to use?
Thanks Umbraco friends 👍
I think better way is to implement custom default controller, you can find documentation here
is working on a reply...