On Wed, 3 Feb 2010 18:29:40 -0200
Fabio Mascarenhas <[email protected]> wrote:
> They are tried in order of preference. But remember that Xavante will
> look at basedir .. "/resources" .. rest_of_uri in your example, are
> you sure the problem isn't that you do not have a "resources" folder
> under your web_resources path?
>
> If you want to strip the /resources part from the path you can try
> this rule:
>
> {
> match = "^(/resources)",
> with = function (req, res, cap)
> req.relpath = req.relpath:sub(#cap[1]+1)
> return xavante.filehandler(settings.get
> "web_resources")(req, res)
> end
> },
This appears to work, with some rearrangement of my rules. Thanks!
You can take this as a feature request for the file handler to take a
parameter for how many path elements to trim :)
Incidentally, my experiments show up something (possibly valid)
confusing. When using HTTP/1.0 and not mentioning a host, 404 pages
contain errors like this:
The requested URL http:///resources/spatula was not found on this
server.
Apache says something somewhat less surprising:
The requested URL /resources/spatula was not found on this server.
--
Rob Kendrick, Support Team Lead Simtec Electronics
Telephone: +44 (0)1772 978013 Avondale Drive, Tarleton
Fax: +44 (0)1772 816426 Preston, Lancs, PR4 6AX, UK
http://www.simtec.co.uk/ mailto:[email protected]
_______________________________________________
Kepler-Project mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/