Sha256: ca0e4a3ef744b06ea089ca6d7e9ffe589b938ccc64793b95e337e3b159a9fc0c
Contents?: true
Size: 1.64 KB
Versions: 31
Compression:
Stored size: 1.64 KB
Contents
<!DOCTYPE html> <html> <head> <title>Redirection - Utopia</title> <meta charset="UTF-8"/> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"/> <link rel="icon" type="image/png" href="../../_static/icon.png"/> <link rel="stylesheet" href="../../_static/site.css" type="text/css" media="screen"/> <script src="../../_components/jquery/jquery.min.js"></script> <script src="../../_components/jquery-syntax/jquery.syntax.min.js"></script> <script type="text/javascript"> //<![CDATA[ jQuery(function($) { $.syntax(); }); //]]> </script> </head> <body class=""> <header> <img src="../../_static/utopia.svg"/> </header> <div id="page"> <nav> › <a href="../../wiki.html">Wiki</a> › <span>Middleware</span> › <a href="redirection.html">Redirection</a></nav> <h1 id="redirection">Redirection</h1> <p>A set of flexible URI rewriting middleware which includes support for string mappings, regular expressions and status codes (e.g. 404 errors).</p> <pre><code class="language-ruby"># String (fast hash lookup) rewriting: use Utopia::Redirection::Rewrite, '/' => '/welcome/index' # Redirect directories (e.g. /) to an index file (e.g. /index): use Utopia::Redirection::DirectoryIndex, index: 'index.html' # Redirect (error) status codes to actual pages: use Utopia::Redirection::Errors, 404 => '/errors/file-not-found' </code></pre> <footer> Last Modified: 2016-12-13 12:37:11 +1300 — </footer> </div> </body> </html>
Version data entries
31 entries across 31 versions & 1 rubygems