Hoe kan je met behulp van headers, of iets anders, een php file een 404 laten geven.
Geen redirect ofzo natuurlijk...
Geen redirect ofzo natuurlijk...
"The shell stopped unexpectedly and Explorer.exe was restarted."
"The shell stopped unexpectedly and Explorer.exe was restarted."
"Anyone who does not agree with me is mentally sick, and should be shot I'm afraid to say."
- Pastor Richards @ VCPR
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."
Je was eerder met de goede code, ik moet copy+pasten.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
"The shell stopped unexpectedly and Explorer.exe was restarted."
Ghehe, en ik typte uit m'n hoofdOp zondag 17 februari 2002 22:56 schreef jelmervos het volgende:
Je was eerder met de goede code, ik moet copy+pasten.
"Anyone who does not agree with me is mentally sick, and should be shot I'm afraid to say."
- Pastor Richards @ VCPR
Zoeken kan daar ook, wist je dat?Op zondag 17 februari 2002 22:56 schreef EgoH het volgende:
Thanx, gelukt.
Had niet gedacht dat dat op php.net zou staan
"The shell stopped unexpectedly and Explorer.exe was restarted."
Neuh, ik had toevallig een kwartier geleden die code zitten intikken.Op zondag 17 februari 2002 22:57 schreef jelmervos het volgende:
Die-hard zeker.
"Anyone who does not agree with me is mentally sick, and should be shot I'm afraid to say."
- Pastor Richards @ VCPR
Aha, nouja... Die-hard in het sturen van 404 HTTP codes zeg maar.Op zondag 17 februari 2002 22:59 schreef intoxicated het volgende:
[..]
Neuh, ik had toevallig een kwartier geleden die code zitten intikken.
"The shell stopped unexpectedly and Explorer.exe was restarted."
Blog, Stratego/XT: Program Transformation, SDF: Syntax Definition, Nix: Software Deployment
Dit topic is gesloten.
![]()