PHP Header

200 OK

	header("Status: 200"); // OK -> Inhalt gefunden

Browser umleiten

	header("Location: http://www.example.com/");

404 Not found

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

204 No Content

	header('HTTP/1.0 204 No Content');
	header('Content-Length: 0',true);
	header('Content-Type: text/html',true);
	flush();

301 Moved Permanently

	header("Location: /foo.php",TRUE,301);

302 Found

	header("Location: /foo.php",TRUE,302);
	header("Location: /foo.php");

303 See Other

	header("Location: /foo.php",TRUE,303);

304 Not modified

	header("HTTP/1.1 304 Not Modified");
	exit;

307 Temporary Redirect

	header("Location: /foo.php",TRUE,307);

Cache unterbinden

	header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
	header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Datum in der Vergangenheit

Wiki-Datei des Artikels herunterladen