correct location and refresh header re-writing for localhost proxy