Re: Is it Apache or me?

2001-02-25 Thread sterling

if you set a handler for / it will handle every request that way.
you can either have all pages that are generated be /foo/ and set 
that as the location, or you can force all files with a certain
suffix to be handled by mod_perl: .


sterling

On Sun, 25 Feb 2001, Jamie Krasnoo wrote:

> I'm not quite sure how this works, and maybe I missed it in the Eagle book.
> I have a handler set in httpd.conf like this:
> 
> 
>   Set-Handler perl-script
>   PerlHandler app::main
> 
> 
> Now this works great when I want to go to the first page of the server.
> However if I try to go to a static page, that page gets intercepted and the
> app::main goes in to action. The handler doesn't intercept any of the other
> set locations. Why is it intercepting static pages? Is it a standard rule
> that a handler for  is never set?
> 
> Thanks,
> 
> Jamie Krasnoo
> www.MyEBoard.com
> [EMAIL PROTECTED]
> 
> public key: http://www.planetphat.com/jkrasnoo/pgp.html
> 




Re: Is it Apache or me?

2001-02-25 Thread Ken Williams

[EMAIL PROTECTED] (Jamie Krasnoo) wrote:

>I'm not quite sure how this works, and maybe I missed it in the Eagle book.
>I have a handler set in httpd.conf like this:
>
>
>   Set-Handler perl-script
>   PerlHandler app::main
>
>
>Now this works great when I want to go to the first page of the server.
>However if I try to go to a static page, that page gets intercepted and the
>app::main goes in to action. The handler doesn't intercept any of the other
>set locations. Why is it intercepting static pages? Is it a standard rule
>that a handler for  is never set?

It sounds like you want this (or similar):


Set-Handler perl-script
PerlHandler app::main


Using  sets things for the entire server, because it means
"everything below /".


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum



RE: Is it Apache or me?

2001-02-25 Thread Jamie Krasnoo

Found a way around it. I used . Now it does what I want
it to do.

Thanks for your help guys.

Jamie

-Original Message-
From: sterling [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 25, 2001 9:26 PM
To: Jamie Krasnoo
Cc: Modperl
Subject: Re: Is it Apache or me?


if you set a handler for / it will handle every request that way.
you can either have all pages that are generated be /foo/ and set
that as the location, or you can force all files with a certain
suffix to be handled by mod_perl: .


sterling

On Sun, 25 Feb 2001, Jamie Krasnoo wrote:

> I'm not quite sure how this works, and maybe I missed it in the Eagle
book.
> I have a handler set in httpd.conf like this:
>
> 
>   Set-Handler perl-script
>   PerlHandler app::main
> 
>
> Now this works great when I want to go to the first page of the server.
> However if I try to go to a static page, that page gets intercepted and
the
> app::main goes in to action. The handler doesn't intercept any of the
other
> set locations. Why is it intercepting static pages? Is it a standard rule
> that a handler for  is never set?
>
> Thanks,
>
> Jamie Krasnoo
> www.MyEBoard.com
> [EMAIL PROTECTED]
>
> public key: http://www.planetphat.com/jkrasnoo/pgp.html
>




Re: Is it Apache or me?

2001-02-26 Thread darren chamberlain

Jamie Krasnoo ([EMAIL PROTECTED]) said something to this effect on 02/26/2001:
> I'm not quite sure how this works, and maybe I missed it in the Eagle book.
> I have a handler set in httpd.conf like this:
> 
> 
>   Set-Handler perl-script
>   PerlHandler app::main
> 
> 
> Now this works great when I want to go to the first page of the server.
> However if I try to go to a static page, that page gets intercepted and the
> app::main goes in to action. The handler doesn't intercept any of the other
> set locations. Why is it intercepting static pages? Is it a standard rule
> that a handler for  is never set?

Another option, besides a LocationMatch or Files section, is to
return DECLINED in your handler:

return DECLINED unless ($r->content_type eq 'text/html');

Now things like images, directories, etc will not be handled by
app::man.

(darren)

-- 
As the poet said, 'Only God can make a tree' - probably because it's
so hard to figure out how to get the bark on.
-- Woody Allen