Catch all route and Backend routes
Hi there,
I'm using Sitefinity 4.1 SP2.
I'm trying to use a catch all handler to return my custom 404 pages for all non-existent routes. However, i need to set RouteExistingFiles to false (cassini fails instantly, this only works under IIS (and express)) to get my css, javascript and image files.
routes.MapPageRoute("NotFound", "*url", Config.ErrorPageUrl);
routes.RouteExistingFiles = false;
Hi Rick De Vries,
Can you please check if your rule is catching the requests for services also? The whole backend is populated with data by services. Is it possible that their execution is failing for some reason?
All the best,
Radoslav Georgiev
the Telerik team
Hi,
I've excluded some paths/resources from routing, it still returns a blank page ( I viewed the page source and it contains absolutely no data)
What I discovered is that the default redirects from the sitefinity/ (to login or the default page) directory do not get fired, and the blank response is returned. If I supply the url with the location i want to go to (sitefinity/Login or sitefinity/Pages) it goes to the sitefinity pages.
How can I fix this?
I've finally fixed this. Because i had routeExistingPages set to false, it recognized the directory as being a file and decided not to act upon it. I removed the line and now it works.