[plt-scheme] url rewriting

From: Hans Oesterholt-Dijkema (hdnews at gawab.com)
Date: Thu Jun 21 05:43:22 EDT 2007

I didn't look into run.ss, but I looked into web-server-unit.ss.
I saw the default dispatcher sequence.

Do I understand you right, that I need to alter the code in these
files to include the url rewriting system?

--Hans



Op 20/6/2007 schreef "Jay McCarthy" <jay.mccarthy at gmail.com>:

>Check out web-server/run.ss and web-server/web-server-unit.ss. The
>first contains an example of the sort of start-up script you will want
>to write and the second contains the current code for setting up the
>default dispatcher sequence.
>
>Jay
>
>On 6/20/07, Hans Oesterholt-Dijkema <hdnews at gawab.com> wrote:
>> So, how can I install a new dispatcher?
>>
>> --Hans
>>
>>
>> Jay McCarthy schreef:
>> > Yes, it is possible.
>> >
>> > Implement a custom dispatcher [1] that does the rewriting, then use
>> > your own dispatching sequencing and put the rewriting dispatcher at
>> > the start. Everything "will just work". Send me the code and I can
>> > then integrate it. Basically you want:
>> >
>> > ; make : (url? -> url?) (conn? req? -> void) -> (conn? req? -> void)
>> > (define (make url->url inner)
>> > (lambda (conn req)
>> >  (inner conn (update-request-url req (url->url (request-url req))))))
>> >
>> > Jay
>> >
>> > 1. See new documentation, in SVN after `mzscheme -mvt
>> > docs/doc-installer.ss' or online at:
>> >
>> > http://jay.teammccarthy.org/tmp/web-server-reference/dispatchers.html#(part%20dispatchers)
>> >
>> >
>> > On 6/7/07, Hans Oesterholt-Dijkema <hdnews at gawab.com> wrote:
>> >> L.S.,
>> >>
>> >> Is it possible to implement url rewriting with the PLT Webserver?
>> >> I'd like to rewrite things like:
>> >>
>> >> http://x.y.z/somepage.html
>> >>
>> >> to
>> >>
>> >> http://x.y.z/servlets/program?page=somepage
>> >>
>> >> Preferably without seeing it at the outside; except when the servlet
>> >> really becomes "active",
>> >> i.e. is used in a continuation style fashion to handle forms.
>> >>
>> >> --Hans
>> >>
>> >> _________________________________________________
>> >>   For list-related administrative tasks:
>> >>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>> >>
>> >
>> >
>>
>>
>
>
>--
>Jay McCarthy <jay.mccarthy at gmail.com>
>http://jay.teammccarthy.org
>
>


Posted on the users mailing list.