Page 1 of 1

UI enabled URLS with built-in "cache"

Posted: Thu Jan 23, 2003 1:58 pm
by piuga
Ok, got this idea and wonder whats wrong with it (I mean I'm average smart not a genius, so why hasn't anyone allready done this, or if it's done, please direct me to that place...)

No mather in what way you generate your "pages" (template, db-back-end, etc) you could use this; the idea is this:

- configure your server to use a php-script as the 404-document (thus this solution is server independent, although possibly not usable for free-hosted-sites)
- design a URL-schema and prepare to generate "pages" acoording to this;
example:

example.com/products/hardware/graphics/geforce3

would, the first time (or if the "page" has expired) generate the file:
example.com/products/hardware/graphics/geforce3/index.php
and then show the contents of this file; the following times this file is requested it's allready there! (throw in some; time-out function in the top of the document, and possibly some banner rotating-function or some other small(?) dynamic content function; and your done)
Thats it, what do you think?

ps. it also scales beautifully to multilingual sites thus requesting:
example.com/produkter/hÄrdvara/grafik/geforce3 would generate the swedish version of the "page"

Posted: Thu Jan 23, 2003 4:31 pm
by gate
Ive been using that method for 2 years now mate.
PHP.net does it -> e.g. http://uk.php.net/fsockopen

Its a good way to get se's to spider deep into your site, without having to user horrible urls ?id=blah.

ok, but caching also?

Posted: Sat Jan 25, 2003 11:11 am
by piuga
Ok, I know that, but is it also using the cach idea, I meant for like example using the Smarty-template enginge (smarty.php.net) and rewrite it's caching so that the file:

example.com/products/hardware/graphics/geforce3/index.php

really exists, not only leads to a 404 and then handled by a errorhandling script that redirects to the real location or creates a temporal "page" for that request.

comments?