The problem I'm having is not to write the contents, the problem is to
get the contents I'm going to write. I must get the output of the
dynamic page (that can be CGI, PHP, SSI, or anything) before it's sent
to the browser... I'm now trying to do it with Apache::OutputChain.
        []s
        Luis

darren chamberlain wrote:
> 
> Luis Henrique Cassis Fagundes ([EMAIL PROTECTED]) said something to this effect:
> >       The idea of a 404 handler will fit perfectly with mod_rewrite: I can
> > create a 404 handler that writes the page to a static file and to the
> > browser and a rewrite rule that redirects request of the dynamic page to
> > the static page.
> >       The only problem is one I already had trying to write a module: I don't
> > know how to get the output of the dynamic page in a handler, to write it
> > to a file. Does anyone knows how to do this?
> 
> In your 404-handling module, open a file handle to $r->filename (the name set
> during the translation phase). Write the contents to this handle, then do an
> internal redirect to that URI. You can use any of the standard file modules
> (IO::File, FileHandle, or even Apache::File) or just use Perl's standard
> open() routine.
> 
> (darren)
> 
> --
> I'm astounded by people who want to 'know' the universe when it's
> hard enough to find your way around Chinatown.
> -- Woody Allen

Reply via email to