On 13-jun-09, at 00:21, Daniel L. Miller wrote: >>> Also, because of this rule definition, it appears I've lost the >>> "index" >>> function. If I specific a complete URL in the browser, well and >>> good - >>> but if I just specify the folder, it gets rejected. >>> >> You can create another rule before this complex rule. It should be a >> "directory" with the same directory name that the complex rule, set >> document root according to that directory and set as non final. >> > That doesn't work - and doesn't seem logical. If we match from top > down, then if I have a simple directory match BEFORE the php match, > then > the php handler won't be executed. And that seems to be how it works > for me.
It depends on whether or not the rule was "Final". When a non-final rule is matched, the evaluation goes on until it either matches a Final rule or the 'Default' rule entry. That allows to refine setting by matching a number of rules. For instance, imagine an scenario where you want to set a special document root for the /downloads web directory. If the requested file exists, the file is sent, otherwise the server rewrites the request. It'd be configured in this way: - Dir. /download, DRoot: /whatever, Final: no - Dir. /download AND Exists, Handler: file, Final: yes - Dir. /download, Handler: redir, Final: yes That's just an illustrative example. The basic idea is that non-final rules allow to apply partial configurations while the request is being matched against the rule list. -- Octality http://www.octality.com/ _______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
