I have this:
http://127.0.0.1:8000/found-locations/?state=--&km=km
I want this:
found-locations/?state=--&km=km <
Use location.pathname and location.search:
location.pathname
location.search
(location.pathname+location.search).substr(1)