On Mar 26, 2007, at 8:46 AM, csnyder wrote:

The correct approach to this, in my opinion, is to create an
application proxy -- a script that will parse incoming request for uri
MayEvent07, convert it into $_GET['eventid'] = 4e...7 using a db
lookup, and then include() the software package's index.php, using an
output buffer so that the urls in the software package's response can
all be converted back to your friendly format.

In other words, build a php wrapper around your software package. Done
right, it won't know the difference, and you don't have to muck around
with httpd.conf.

This is an interesting technique. I like the fact that it could easily be wrapped around an existing site without messing around with mod_rewrite. But the idea of modifying URLs in the buffered output has always seemed a little sketchy to me. I'm imaging some sort of regex replace, right? What about urls that are constructed dynamically in javascript? And I feel there must be other holes. Is there a way this can be done reliably, or am I just being paranoid?

-- Dell


_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to