Skip to content

Instantly share code, notes, and snippets.

@piotr-zuralski
Created February 24, 2022 22:27
Show Gist options
  • Save piotr-zuralski/9c5e670b845ad5d691c9f451c742f129 to your computer and use it in GitHub Desktop.
Save piotr-zuralski/9c5e670b845ad5d691c9f451c742f129 to your computer and use it in GitHub Desktop.
<?php
setlocale(LC_ALL, 'pl_PL.utf8');
date_default_timezone_set('Europe/Warsaw');
header_remove();
/*
$date = new DateTime();
$dateModified = new DateTime();
$dateModified->setTime(0, 0, 0);
$dateModified->setDate(2000, 01, 01);
$dateExpires = new DateTime();
$dateExpires->setTime(0, 0, 0);
$dateExpires->setDate(2040, 01, 01);
$interval = ($dateExpires->getTimestamp()-$date->getTimestamp());
//header('Server: WebServer');
//header(sprintf('Cache-Control: public, max-age=%1$d, s-maxage=%1$d', $interval));
//header(sprintf('Date: %s', $date->format(DateTime::RFC2822)));
*/
header('HTTP/1.1 404 Not Found');
header('ETag: 6666cd76f96956469e7be39d750cc7d9');
header('Cache-Control: public');
header('Last-Modified: Sat, 01 Jan 2000 00:00:00 GMT');
#header('Expires: Sun, 01 Jan 2040 00:00:00 GMT');
header('Content-Type: text/html; charset=UTF-8');
header('Content-Length: 0');
header('X-Robots-Tag: noindex, nofollow');
#header('Link: <http://zuralski.net/>; rel="canonical"');
header('Connection: close');
header('X-Connection: close');
exit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment