Welcome to WebmasterWorld Guest from 54.159.50.111

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Rasing a 404 on purpose

404 php directory

     
9:13 am on Mar 21, 2008 (gmt 0)

New User

5+ Year Member

joined:Mar 20, 2008
posts:21
votes: 0


At moment if a user types an invalid category he gets a CATEGORY NOT FOUND MESSAGE.

I would like to RETURN a 404 rsponse. headers and all

How do i do this? thanks

1:27 pm on Mar 21, 2008 (gmt 0)

Full Member

10+ Year Member

joined:Aug 3, 2005
posts:269
votes: 0


when the user finds a category that isnt there use this header.

header("HTTP/1.0 404 Not Found");

make sure this is before you have output any html

Ally

1:48 pm on Mar 21, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
posts:5966
votes: 0


Welcome to WebmasterWorld, rudyten! :)