[UPHPU] Rewriting Apache URLs
Smith, Jeff
Jeff.Smith at hollycorp.com
Mon Aug 7 17:57:46 MDT 2006
-----Original Message-----
From: Mac Newbold [mailto:mac at macnewbold.com]
Sent: Monday, August 07, 2006 2:25 PM
To: Smith, Jeff
Cc: uphpu at uphpu.org
Subject: Re: [UPHPU] Rewriting Apache URLs
Another way you can make Apache accept URLs that do not correlate with
actual files/directories is with the ErrorDocument directive, in which
you specify a PHP script as an error handler script. In that script, you
can see what they were asking for, then decide what to do to respond. If
it is something you expected, you can send back a 200 OK status instead
of the 404, and hand them their content as if the file really existed.
Otherwise, you can run a search, show them a 404 error page, or whatever
you want.
We've used it in a variety of ways with great success. I did a
presentation on it many months ago for a few people who came, but I
don't think I ever got around to posting the slides.
Thanks,
Mac
----
I have to say this is the best idea I have heard in a long time. Idea
of the month even. ;) Then again it is for a small personal website
where I can express my radical opinions (like why Microsoft isn't all
evil, and why net neutrality isn't a perfect solution). Once again
thanks.
Jeff Smith
http://www.arcanatower.com
More information about the UPHPU
mailing list