def redirect(url, status: (env['HTTP_VERSION'] == 'HTTP/1.1') ? 303 : 302, halt: true)
      response['Location'] = absolute(url)
      response.status = status
      self.halt if halt
    end
def redirect(url, status: (env['HTTP_VERSION'] == 'HTTP/1.1') ? 303 : 302, halt: true)
      response['Location'] = absolute(url)
      response.status = status
      self.halt if halt
    end
Redirects to the specified path or URL. An optional HTTP status is also accepted.