restructure so that request can know what part of the url is what