docs: def redirect(req, _log=pymagic.get_lazy_logger("redirect")):
      """ Redirect controller to emit a HTTP 301.
      """
      log = req.environ.get("wsgilog.logger", _log)
      target = req.relative_url(req.urlvars.to)
      log.info("Redirecting '%s' to '%s'" % (req.url, target))
      return exc.HTTPMovedPermanently(location=target)