How to handle redirects:
For historical reasons, the default is "return" for $1format=json and "resolve" for other formats.