added wildcard support and checking pathname instead of url