Pakyow.orgv0.11

Redirecting

Issuing a browser redirect is easy:

redirect '/foo'

Or even better, if you define your route with a name (such as :foo) the URI will be generated automatically:

redirect :foo

When redirecting, the response status is set to 302 by default and the response is sent immediately.

You can override the default status by passing a status code:

redirect '/foo', 301
Google+