package ocsigenserver

  1. Overview
  2. Docs
A full-featured and extensible Web server

Install

dune-project
 Dependency

Authors

Maintainers

Sources

8.0.0.tar.gz
md5=be7a28e3a79cc028d35c88eca538ee8b
sha512=08cdaab31864aeba743ad0c03077a6eccf1089e7b7c4078045dab9409d409144b70cc546df7881b64b780689eee642ca2391be84ab2a6a8ffee0fbed2ad5ac98

doc/rewritemod.html

Rewritemod

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, load OCamlfind package ocsigenserver.ext.rewritemod, either from your Dune file (if you are using static linking), or from the configuration file:

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

This page describes the configuration file options. If you are building a statically linked executable without configuration file, use the corresponding functions from module Rewritemod.

Configure your hosts from the config file 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".