RE: [PHP] Interesting Question (honest :O)
| From: | Jon Haworth | Date: | Thu, 04 Jan 2001 14:16:34 +0000 |
| Subject: | RE: [PHP] Interesting Question (honest :O) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-32635@lists.php.net to get a copy of this message | ||
If it's Apache you're running, you just need to edit the httpd.conf file to
read:
ErrorDocument 404 /path/to/my/404-file.php
HTH
Jon
-----Original Message-----
From: Gareth Davies [mailto:garethdavies@frogtrade.com]
Sent: 04 January 2001 14:14
To: php-general@lists.php.net
Subject: [PHP] Interesting Question (honest :O)
Hi and a happy new year to you all.
How do I trap a request for a none existant page on my server with a php
page? My reason for wanting to do this is so that people can access my
domain with an extension of their own company name, e.g.
www.mydomain.com/company - Rather than creating loads of little html pages,
one for each "company" name, I want to automatically redirect any failed
page requests to a generic php file that can then check a database and
present whatever page is relevant to the "company" name given.
Hope that makes sense. Not sure if it's PHP, probably Apache, but figured
you guys were more likely to know the answer than the Apache forums.
Thank you in anticipation.
Kind regards,
Gareth Davies
Progressive Business Services Ltd
+44 (0) 1274 889592 Office
+44 (0) 1274 889656 Fax
+44 (0) 7970 733851 Mobile (24 Hour)