You are here: Re: Custom error handling in php e.g. 404 not found « All PHP « IT news, forums, messages
Re: Custom error handling in php e.g. 404 not found

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация