[plt-scheme] url rewriting
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