Hi,

I'm trying to configure Xavante with two distinct filehandler
handlers.  I seem to be having trouble with the semantics of the rules
table, and all I can find in the documentation are examples that only
have the one rule for using filehandler.

What I have currently is this:

{
        {
                match = "^/index$",
                with = wsapi.xavante.makeHandler(pages.index.run, "", "", "")
        },

        {
                match = "^/resources",
                with = xavante.filehandler,
                params = { baseDir = settings.get "web_resources" }
        },

        {
                match = ".",
                with = xavante.filehandler,
                params = { baseDir = root .. "docroot/" }
        }
}

What I am trying to achieve is that certain leafs get redirected to
WSAPIs, anything in the URI path /resources/ gets fetched from a
directory on the local file system, and everything else gets fetched
from a different directory on the local file system.

However, a quick strace shows that requests for /resources/foo get
looked up in the latter (match = "."), and a 404 returned.  Are these
rules not in order of preference of match, decending?  Have I confused
the meaning of it?

Thanks,
-- 
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:r...@simtec.co.uk

_______________________________________________
Kepler-Project mailing list
Kepler-Project@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to