404

Pagina: 1
Acties:
  • 47 views sinds 30-01-2008

  • EgoH
  • Registratie: Oktober 2001
  • Laatst online: 11-09 21:40
Hoe kan je met behulp van headers, of iets anders, een php file een 404 laten geven.
Geen redirect ofzo natuurlijk...

  • jelmervos
  • Registratie: Oktober 2000
  • Niet online

jelmervos

Simple user

Goede HTTP header sturen?

"The shell stopped unexpectedly and Explorer.exe was restarted."


  • EgoH
  • Registratie: Oktober 2001
  • Laatst online: 11-09 21:40
en die is?

  • jelmervos
  • Registratie: Oktober 2000
  • Niet online

jelmervos

Simple user

Volgens mij staat hier een goed voorbeeld.

"The shell stopped unexpectedly and Explorer.exe was restarted."


  • intoxicated
  • Registratie: Januari 2001
  • Niet online

intoxicated

Haaaai :w | ALT-S

header("HTTP/1.0 404 Not Found");
of
header("Status: 404 Not Found");

Edit: F*ck, net te laat :P

"Anyone who does not agree with me is mentally sick, and should be shot I'm afraid to say."
- Pastor Richards @ VCPR


  • jelmervos
  • Registratie: Oktober 2000
  • Niet online

jelmervos

Simple user

Check:
For example, if you have configured Apache to use a PHP script to handle requests for missing files (using the ErrorDocument directive), you may want to make sure that your script generates the proper status code.


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



Note: In PHP 3, this only works when PHP is compiled as an Apache module. You can achieve the same effect using the Status header.


header("Status: 404 Not Found");

"The shell stopped unexpectedly and Explorer.exe was restarted."


  • jelmervos
  • Registratie: Oktober 2000
  • Niet online

jelmervos

Simple user

Op zondag 17 februari 2002 22:55 schreef intoxicated het volgende:
header("HTTP/1.0 404 Not Found");
of
header("Status: 404 Not Found");

Edit: F*ck, net te laat :P
Je was eerder met de goede code, ik moet copy+pasten. :)

"The shell stopped unexpectedly and Explorer.exe was restarted."


  • EgoH
  • Registratie: Oktober 2001
  • Laatst online: 11-09 21:40
Thanx, gelukt.
Had niet gedacht dat dat op php.net zou staan

  • intoxicated
  • Registratie: Januari 2001
  • Niet online

intoxicated

Haaaai :w | ALT-S

Op zondag 17 februari 2002 22:56 schreef jelmervos het volgende:
Je was eerder met de goede code, ik moet copy+pasten. :)
Ghehe, en ik typte uit m'n hoofd :)

"Anyone who does not agree with me is mentally sick, and should be shot I'm afraid to say."
- Pastor Richards @ VCPR


  • jelmervos
  • Registratie: Oktober 2000
  • Niet online

jelmervos

Simple user

Op zondag 17 februari 2002 22:56 schreef EgoH het volgende:
Thanx, gelukt.
Had niet gedacht dat dat op php.net zou staan
Zoeken kan daar ook, wist je dat?

Of anders Google: http://www.google.com/search?hl=nl&q=PHP+header+404&btnG=Google+zoeken&lr=

"The shell stopped unexpectedly and Explorer.exe was restarted."


  • jelmervos
  • Registratie: Oktober 2000
  • Niet online

jelmervos

Simple user

Op zondag 17 februari 2002 22:56 schreef intoxicated het volgende:

[..]

Ghehe, en ik typte uit m'n hoofd :)
Die-hard zeker. Ik gebruikte Google, en kwam op die PHP page.

"The shell stopped unexpectedly and Explorer.exe was restarted."


  • intoxicated
  • Registratie: Januari 2001
  • Niet online

intoxicated

Haaaai :w | ALT-S

Op zondag 17 februari 2002 22:57 schreef jelmervos het volgende:
Die-hard zeker.
Neuh, ik had toevallig een kwartier geleden die code zitten intikken. :)

"Anyone who does not agree with me is mentally sick, and should be shot I'm afraid to say."
- Pastor Richards @ VCPR


  • jelmervos
  • Registratie: Oktober 2000
  • Niet online

jelmervos

Simple user

Op zondag 17 februari 2002 22:59 schreef intoxicated het volgende:

[..]

Neuh, ik had toevallig een kwartier geleden die code zitten intikken. :)
Aha, nouja... Die-hard in het sturen van 404 HTTP codes zeg maar. :)

"The shell stopped unexpectedly and Explorer.exe was restarted."


  • mbravenboer
  • Registratie: Januari 2000
  • Laatst online: 06-11-2025
Tsssss voor zoiets pak je toch gewoon ff de HTTP standaard erbij? Zo gevonden :P .

Blog, Stratego/XT: Program Transformation, SDF: Syntax Definition, Nix: Software Deployment

Pagina: 1

Dit topic is gesloten.