Thank you,
Matthew Boulos
I know you're looking for a PHP solution for this, and it is possible to do
it that way too, but I suspect php.net is just using mod_rewrite. It's a
powerful Apache module that allows you to use regular expression pattern
matching, environment variables, etc. as a basis for "rewriting" urls,
either visibly or transparently. It can do nifty things like "If a file
exists at 'www.theforcer.com/blah', then display that resource, otherwise
rewrite the url invisibly to 'www.theforcer.com/article.php?a=blah' unless
the HTTP_REFERER is from 'www.thehtmlthief.com' in which case rewrite the
url visibly to 'www.theforcer.com/404error.html'. Great stuff. The docs
are at apache.org.
The PHP solution involves using the variables found in phpinfo() to parse
the current url into variables, rewrite them into a new url, then send a
new header(). But mod_rewrite is so much more elegant. And I expect a
good deal faster for the task.
--
CC
"CC Zona" <ccz...@nospam.invalid> wrote in message
news:50ct6.8169$227.8...@newsread2.prod.itd.earthlink.net...