http headers

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
jazz090
Forum Contributor
Posts: 176
Joined: Sun Apr 12, 2009 3:29 pm
Location: England

http headers

Post by jazz090 »

i have set up custom error pages with apache but there not being displayed when i throw something like this in:

Code: Select all

header('HTTP/1.1 404 Not Found');
any ideas how to fix this?
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: http headers

Post by Mark Baker »

header('HTTP/1.1 404 Not Found'); doesn't tell Apache to display the custom 404 page that you have configured in httpd.conf, it sends that response back to the browser.... your script is controlling the 404 response directly
Post Reply