That was a fine idea Doug, but what if we push the subject and
go a little further?

I am thinking now that i'd like to make it possible that for
ANY http request received by my Apache i'd like to have a php
script executed first, i.e.:

http://domain.com/
http://domain.com/anydir/anyfile

for any of those locations typed, i'd like to be able to
execute the php script. i know it's kinda weird but this is
what i'm really looking for. any ideas anyone?

Enrique-

>From: "Doug Granzow" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: [PHP] Re: execute a script on access to a directory
>Date: Fri, 7 Sep 2001 15:38:45 -0400
>
>You can make "go" the name of your PHP script, then put this in your Apache
>config:
>
><Location /go>
>     ForceType application/x-httpd-php
></Location>
>
>Now in your "go" script, you have it do whatever you wanted it to do, then
>use an include to load the "getit" script.
>
>Doug Granzow
>[EMAIL PROTECTED]
>
><[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I would like to know how i can force a PHP script to be
> > executed everytime a certain directory is accessed, for
> > example in http://domain.com/go/getit the presence of the
> > /go/ directory would force a PHP script to be executed
> > prior to any operation.
> >
> > Do i need to play with rewriting urls in Apache or is
> > there any other cleaner method (that would not require
> > rewriting URLs) to achieve this? i'd hate to have to
> > rewrite URLs...
> >
> > thanks.


_________________________________________________________________
Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to