RE: [PHP] how to generate static html pages from dynamic php pages
| From: | John Holmes | Date: | Thu, 09 May 2002 05:40:53 +0000 |
| Subject: | RE: [PHP] how to generate static html pages from dynamic php pages | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96745@lists.php.net to get a copy of this message | ||
> As to the second concept -- you can do this using apache rewrite rules
> -- I remember seeing an article about it a year ago and unfortunately
> lost the link to the article. <sigh> Anyone remember this article?
Yeah, I know about that, too. But with that, the request still goes
through the database and PHP once the variables are exploded() form the
URI.
What I'm talking about is a user goes to a nonexistent page,
www.domain.com/products/1234 and should get a 404 error. Instead, your
404 page looks in the database for product 1234 and sees if it exists.
If it does, it writes the file products/1234/index.html with the data
from the database. Now, when the next person follows your link to
www.domain.com/products/1234, they get your html page, instead of
hitting PHP and the database, thus saving you some resources...
Except you can't do this...b/c it's patented...
I think I'm just going to make that my .sig from now on... :)
---John Holmes...