I'm trying to restrict access to a particular page, I've already read everything possible on the matter but instead of redirecting to login page Sitecore is returning a 404. I've set the loginPage="/Login" but SC returns not found on the requested page eg."/restricted" I've removed the extranet/anonymous read right to that page, if I allow it back it works fine. If I add the requireLogin="true" then it works but also restrict access to entire website, which I don't want to.
I just can't understand why when I remove requireLogin="true" SC instead of redirec to login page it returns not found 404.
Anyone can help?
Just adding a bit more info, on further investigation (yeah you know what that means, reading disassembled sitecore.kernel), I compared the two versions of the class Sitecore.Pipelines.HttpRequest.ItemResolver and look at what I found.
Sombody removed that line on sitecore 9 !!! not sure if that was intentional but it looks like a bug, and a silly one, I'll try to override that ItemResolver if I get a solution I'll post as answer