wai-extra-0.4.0.2: Provides some basic WAI handlers and middleware.

Network.Wai.Middleware.Rewrite

Synopsis

Documentation

rewrite :: ([Text] -> IO [Text]) -> MiddlewareSource

rewrite based on your own conversion rules Example usage: rewrite (autoHtmlRewrite static)

autoHtmlRewrite :: String -> [Text] -> IO [Text]Source

example rewriter implements 2 rules for static html re-writes 1) for a directory foo, check for fooindex.html 2) for a non-directory bar, check for bar.html if the file exists, do the rewrite