NYCPHP Meetup

NYPHP.org

[nycphp-talk] Cool new feature on php.net

Sterling Hughes sterling at bumblebury.com
Mon Mar 3 14:12:02 EST 2003


> Hey! This strikes me as a really great way to mix dynamic content with 
> static. The way php.net enables this feature is to use an Apache 
> directive to invoke a script if the requested page isn't found:
> 
> ># Handle errors with local error handler script
> >     ErrorDocument 401 /error/index.php
> >
> But another way to look at this is just the opposite: for most requests, 
> I want the script to generate a page dynamically based on the request. 
> But every now and then (a cache for popular pages, say, or an override) 
> a page will actually exist at the requested URI, which will then be served.
> 
> Off to experiment I go!
> 

Yep, you can do the same thing with a mod_rewrite handler btw (it will
give you more control at the sake of portability.)

-Sterling

>     chris.
> 
> 
> 
> Adam Fields wrote:
> 
> >On Mon, Mar 03, 2003 at 01:56:54PM -0500, Adam Fields wrote:
> >  
> >
> >>Cool, yes. Not new - they've been doing this for quite some time now.
> >>    
> >>
> >
> >Oh, also - more details (including instructions on how to set up
> >similar things for your own Apache server) are here:
> >
> >http://www.php.net/urlhowto.php
> >
> >  
> >
> 
> 
> -- 
> If US military spending was cut by 1/6th, we could spend $100 billion on the arts, with change.
> Imagine: culture instead of killing.
> 
> 
> 
> 
> --- Unsubscribe at http://nyphp.org/list/ ---
> 

-- 
"Reductionists like to take things apart.  The rest of us are
 just trying to get it together."
    - Larry Wall, Programming Perl, 3rd Edition



More information about the talk mailing list