remove trailing slash when not a request for root