improvements to page path regex check