Posted by J.O. Aho on 02/07/06 18:56
©® wrote:
> Is it possible to use PHP for generating custom error pages (e.g. 404
> not found etc.) instead of .htaccess or other means?
> A friend is giving me free webspace so there is no CPanel or any other
> kind of assistance that I can make use of.
> I tried .htaccess but then for some reason it doesn't show my site.
..htacceess requires
1. Server is running apache
2. usage of .htaccess has been enabled
In .htaccess you can't redefine everything, there are limitations and you can
take a look in the apache manual:
http://httpd.apache.org/docs/1.3/howto/htaccess.html
> I saw in a UK magazine (Web Developer) something about this but never
> bought the magazine and now can't find what I was looking for at Google.
> Any help appreciated.
You would need to get every request redirected to one of your pages and that
page would lookup and see if the requested page is there or not, then either
serve the page or generate an error page.
For tuther information you can take a peak at
http://se.php.net/manual/en/function.header.php
//Aho
[Back to original message]
|