fix url method to adapt nginx