module Sinatra::Helpers

def redirect(uri, *args)

Halt processing and redirect to the URI provided.
def redirect(uri, *args)
  status 302
  response['Location'] = uri
  halt(*args)
end