Support URLs with a query string

This was only supporting the front-end EP urls

See: https://github.com/GigaOM/legacy-pro/issues/2997