md wrote:
> I'm replacing an exisiting PHP site with mod_perl and
> Template-Toolkit.
> 
> I normally set up mod_perl to use a location like
> this:
> 
> <Location /something>
> 
> and set the handler to my mod_perl module.
> 
> However, I need to map to "/" since I'm replacing a
> system where there are existing PHP files like
> www.someserver.com/index.php or
> www.someserver.com/about.php.
> 
> I decided to do use
> 
> <Location />
> 
> to map to my main mod_perl script. 
> 
> The first thing it does is to check if the uri ends
> with a .phtml extension (or www.someserver.com or
> www.someserver.com/...same with subdirectories). If
> there is, I continue processing, otherwise I decline
> it and let Apache handle it. 
> 
> If I have a .phtml (or a directory index) I check if I
> have a template. If I have a template TT takes over,
> if not I return DECLINED and let Apache take over.
...
> Is this the best way to do this?

you should probably use a custom PerlTransHandler handler with 
push_handlers, e.g. see:
http://modperl.com:9000/book/chapters/ch7.html#Installing_a_Custom_Response_Han
and the whole section.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to