simple header question

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
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

simple header question

Post by shiznatix »

i want when a person tries to view a directory they get a 401 Unauthorized so i do this

Code: Select all

<?
header("HTTP/1.0 401 Unauthorized");
?>
and i save it as index.php of course. sadly it just displays a blank page and not the awesome 401 page. this is probably becuase of some server config but i don't know how to set that up.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Thinks you can set up in httpd.conf (if using Apache) - requires reading of the conf file, and maybe the Apache manual.
Post Reply