fix rewrite of locale inside all path if present