Sha256: c8989c896f61296881d0974dd8e371f4a21f0a1ba76d72944f67e181dee30319
Contents?: true
Size: 1.66 KB
Versions: 31
Compression:
Stored size: 1.66 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