Geoffrey,

I want to thank you again for pointing me in the right direction!

With the sample code, I've been able to put together a semi-working module that allows me to regex the incoming uri and rewrite the DocumentRoot on the fly. This is some cool stuff.

I've run into a minor problem with php_value include_path for some of my php sites. I need to find out if there are any modules in existence that will allow me to update php_value include_path on the fly like I did with document_root. I'll start a separate thread in this group with that question.

Thanks again for the great pointers.

Respectfully,


Gary



Geoffrey Young wrote:

Gary C. New wrote:


Definitely looks like the code I'm after.

I guess what is unclear to me is how to implement it.


it's a PerlTransHandler, so you'd use it from your httpd.conf like this

PerlModule My::TransHandler
PerlTransHandler My::TransHandler

and put your code, My/TransHandler.pm, someplace where mod_perl can see it,
such as in ServerRoot/lib/perl/My/TransHandler.pm.  see recipe 7.1

http://www.modperlcookbook.org/chapters/ch07.pdf

for more details - it might help clear things up a bit.


suburbanantihero states that the <Perl> sections are only configurable
on load time.


typically, yes (as I also said :)  but they will execute in .htaccess files
as well (but don't worry about that, it's not what you are after).


So I would need to bind it as a handler to the ssl
virtualhost section.  Is this correct?


translation handlers run for every request and can be scoped on a virtual
host basis.  so, once it's installed it will do the mapping you require.


I am not sure how this would then be invoked.  Would it require further
extension to my URI?


the job of a translation handler is to map a URI to a filename on disk.  in
this case, you would be envoking a bit of trickery - altering the URI so
that the default Apache translation engine thinks the URI is different than
it really is.

but as I just said, it will be run on every request - it is invoked by
virtue of its nature, as a product of how Apache handles requests and allows
you to plug into them.

anyway, looks like you need to settle down with some mod_perl documentation
and understand the Apache request cycle a bit :)  http://perl.apache.org/ is
the place to start.  you also might find the general request cycle overview here

http://www.modperlcookbook.org/chapters/part3.pdf

helpful

HTH

--Geoff





-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to