[racket] passing a list of dispatch clauses to dispatch-rules

From: Janos Tobias Locsei (jtlocsei at cantab.net)
Date: Tue Dec 17 09:11:08 EST 2013

I thought I'd add a note about what my overall objective with this is, in
case there's a completely different way of achieving the same thing.

Basically what I want is to be able to serve a combination of apps and
static html pages on my domain, but I don't want ".html" as the end of the
url for the static pages. So, if someone goes to the url

http://mysite.com/lolcats

...then I'd like the web server will look in the directory
/htdocs/static-html/ and check whether there's a file called lolcats.html,
and serve that page if it's there.

My idea was that to achieve this I'd write a dispatch function that would
check the static-html directory for a file with the correct name, and serve
that page using the "include-template" function in
web-server/templates<http://docs.racket-lang.org/web-server/templates.html>.


But if there's an easier/better way of achieving the same thing then I'm
open to that.

Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20131217/8fa96fd0/attachment.html>

Posted on the users mailing list.