pacopepe22 pacopepe22 wrote: > 2008/8/24 Miguel Angel Ajo Pelayo <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> > > Cherokee supports php5, I can warantee that (It's in production on my > servers). You have to use it in the php5-cgi form (FastCGI) much > faster than the php5 plugin for apache :-) > > About the rewrites, I suppose that your rewrite means: > > "Everything that doesn't end with .jpg, .gif, .css, etc.." rewrite > it to index.php ? > > Yes! The Zend Framework need it.
Of course these set ups are possible with Cherokee. In fact, they are even easier to write than with the ancient pseudo-XML and mod_* :-) Let's see. A virtual server behavior is defined by a set of ordered rules. Every time the server accepts a requests, it evaluates the request against the table in order to figure how it should be handled. If you prefer to think in lower level terms, it is quite similar to a routing table (the IP would be the request, and the routing table would be the behavior list). So, which behavior rules would you have to set in order to force it to handle everything but a few file extensions with a fixed php file? It'd be something like this: ======== Extensions=js,ico,gif,jpg,png,css Handler=File Final=Yes Default Handler=FastCGI Final=Yes (php) ======== Remember that rules are ordered and are evaluated from top to bottom. In this case, setting these two rules would do the trick. The last tweak would be to edit the details for the "Default" rule (the last one). Here you will have to set the "Script Alias" to the full path of your index.php file (that's important, it must be the full path). And finally, ensure that the "Check File" property is unselected. The rationale is: - If the request targets a static file, it will match the first rule; thus, it will use the Static Content handler as configured. - If not so, the request will match with the final rule (Default), so it will be handled by the index.php file. I hope this helps. If you have any doubt, do not hesitate to ask. -- Greetings, alo http://www.alobbs.com/ _______________________________________________ Cherokee mailing list [email protected] http://lists.octality.com/listinfo/cherokee
