Simplify URL directory matching