Prevent possible 301 redirects (#822)