Warning: Reason support is experimental. We are looking for beta-tester and contributors.


Rewritemod allows to rewrite the requests.It is available from Ocsigen version 1.2. It is really basic for now, but for most uses you don't need it, as staticmod and others already have sophisticated configuration features. It is in beta version. Submit your bugs and feature wishes here.

To use that extension, first load it from the configuration file:

<extension findlib-package="ocsigenserver.ext.rewritemod"/>

Then configure your hosts as in this example:

<rewrite regexp="(.*)" url="toto/\1"/>

The syntax of regular expression is PCRE's one.

By default, the modified request will restart from the beginning, as if it were a new request. If you do not want to restart, but just continue to the next options in the configuration file, add attribute continue="continue".