strip trailing slash when url is empty