[plt-scheme] URL rewrite/dispatch in PLT Web server

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Tue Mar 27 14:11:04 EDT 2007

> I took a look at the source code. Seems like I need to edit them to
> add a new dispatcher, as it is evident by looking at this file,
> http://ja.soegaard.net/planet/html/collects/web-server/web-server-unit.ss
> As you can see there is code `specific' to each of the available dispatcher.

You would need to make a new module like web-server-unit.ss with a
different dispatch function, your new dispatcher would rewrite URLs
before passing them to the standard dispatchers, then take any
response generated by the standard stack and replace the URLs going
out. The dispatcher API is straight-forward from the many examples in
the dispatchers/ directory.


Jay McCarthy <jay.mccarthy at gmail.com>

Posted on the users mailing list.