Hmm... I'm not sure I fully understand all the cases when they're laid out like this. Could you create a private static bool helper: "IsValidLocalUrl(Url)" that just captures all these Url.StartsWith calls? Then they can be formatted a little better so it's clearer what's going on.