You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Jonathan Linczak <li...@hiram.edu> on 2004/06/30 20:10:24 UTC

PHP and Lenya - one last attempt

Hi all,

I've pretty much given up on PHP and Lenya (and focusing on XSP 
instead), but I wanted to throw out an idea just to see if this is even 
possible.

What if I could add this pipeline to the publication-sitemap, merely 
reading what the page has:

<map:pipeline>
   <map:match pattern="**/*.php">
     <map:read mime-type="text/html" src="{1}/{2}.php"/>
   </map:match>
</map:pipeline>

Then, by using mod_proxy techniques in Apache, add this line to have 
the container ignore all *.php files:

RewriteRule "^/(.*)\.php$" "$0" [L]

(based from Wiki site: 
http://wiki.cocoondev.org/Wiki.jsp?page=ApacheModProxy)

Would something like this work, or is there a fundamental flaw behind 
this?  If so, what?

Jon


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: PHP and Lenya - one last attempt

Posted by Steven Noels <st...@outerthought.org>.
On 30 Jun 2004, at 20:10, Jonathan Linczak wrote:

>     <map:read mime-type="text/html" src="{1}/{2}.php"/>

> RewriteRule "^/(.*)\.php$" "$0" [L]

> Would something like this work, or is there a fundamental flaw behind 
> this?  If so, what?

A Cocoon reader reads a file directly from disk - no rewriting wizardry 
available anymore. You would need a PHP Generator for that (used to 
exist one day, dunnow what its status is), or make sure 
Cocoon/Tomcat/Jetty don't see requests for *.php - which should be 
configured on the front-end response-generating level (i.e. httpd).

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source Java & XML            An Orixo Member
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org