yesodweb/wai — pull request #213 by hdgarrood (2014-01-04 00:39:29+00:00)
Title: Add Network.Wai.UrlMap

This module gives you a way to mount applications under sub-URIs. For example:

```
bugsApp, helpdeskApp, apiV1, apiV2, mainApp :: Application

myApp :: Application
myApp = mapUrls $
mount "bugs" bugsApp
<|> mount "helpdesk" helpdeskApp
<|> mount "api"
( mount "v1" apiV1
<|> mount "v2" apiV2
)
<|> mountRoot mainApp
```

Then, `bugsApp` will be accessible under `/bugs`, and, for example, a request to `/bugs/show/35` will be seen by the bugs application as just `/show/35`.