update url rewriter handling for base urls