Best way to attach a module to /

2001-06-14 Thread Jamie Krasnoo

What is the best way to attach a module to be run when a user first enters
the site?

use LocationMatch and set it to only match / as in ^/$ ?

Thanks,

Jamie Krasnoo
[EMAIL PROTECTED]




Re: Best way to attach a module to /

2001-06-14 Thread Ged Haywood

Hi there,

On Thu, 14 Jun 2001, Jamie Krasnoo wrote:

 What is the best way to attach a module to be run when a user first
 enters the site?

Can you be a bit more specific?

73,
Ged.




Re: Best way to attach a module to /

2001-06-14 Thread Andrew Ho

Hello,

JKWhat is the best way to attach a module to be run when a user first
JKenters the site?

GEDCan you be a bit more specific?

I think the question is better phrased by the subject, how can I
use mod_perl to handle all requests?

This is less intuitive than the much more easily understandable how can I
use mod_perl to handle a request for a certain URL? In the latter case
you can use Apache::Registry (and associate it with LocationMatch or
FilesMatch or whatever) or an explicit handler. In the former case, it's
not as obvious.

One solution is to use a PerlTransHandler with a dispatch table in it. The
PerlTransHandler will be called on all requests, and you can inspect
$r-uri to see if you want to handle it. Return DECLINED if it's not
something you're interested in handling (say a /images URL); otherwise,
handle the request right away, internally redirect to another handler, or
just directly add the handlers you want down the chain.

Hope that helps--

Humbly,

Andrew

--
Andrew Ho   http://www.tellme.com/   [EMAIL PROTECTED]
Engineer   [EMAIL PROTECTED]  Voice 650-930-9062
Tellme Networks, Inc.   1-800-555-TELLFax 650-930-9101
--