> I would like to propose a small extension in the logic of how
> XQueryURLRewrite finds the file with redirection rules.
> The idea is to search for controller.xql first in the sub-directories
> matching the URL structure and if not such file is found then execute the
> main webapp/controller.xql.
I implemented your proposal in rev 9247. XQueryURLRewrite can now scan
the directory or collection hierarchy to find a controller.xql which
matches the request path. For example, if the requested path is
/exist/a/b, XQueryURLRewrite will check the directories webapp/a and
webapp/a/b for an XQuery file called controller.xql and executes the
last one it finds.
The start point for the search is determined by configuration
parameter "base" in web.xml. This parameter can also point to a
collection in the db, causing XQueryURLRewrite to search the
collection hierarchy instead of the file system.
<filter>
<filter-name>XQueryURLRewrite</filter-name>
<filter-class>org.exist.http.urlrewrite.XQueryURLRewrite</filter-class>
<init-param>
<param-name>base</param-name>
<param-value>xmldb:exist:///db</param-value>
</init-param>
</filter>
Wolfgang
------------------------------------------------------------------------------
_______________________________________________
Exist-open mailing list
Exist-open@...
https://lists.sourceforge.net/lists/listinfo/exist-open