I am trying to create a route in route table that routes to a virtual item (using a cms that creates url like example.com/about/company, where there is no physical file called company exists) using system.web.routing (unfortunately i cannot use iis rewriting/routing). I have tried the following but it results in 404. If I were to point to another physical file (tor testing purpose), the routing works fine.
void RegisterRoutes(RouteCollection routes)
{
routes.RouteExistingFiles = true;
routes.MapPageRoute("about", "about/us", "~/about/company", false);
}
So, is it possible to point to an item like that?
Hopefully this will help you, this specific example is for Sitecore but the project is open source and I imagine it would not be too difficult to re-purpose the parts you need for your solution.
The gist of this is project is to allow you to use the MVC routing engine with a webforms solution. I will add the cavet that you will need to dig into the code a bit but hopefully will put you on the right track.
https://github.com/Sitecore/Sitecore-Mvc-Routing