remove the last '/' of $url