make Location headers use correct URLs