Try not replacing the trailing slash