bugfix when using an html file : remove ending slash in url segment