properly strip all unneeded url arguments