rewrite locations for localhost proxy