silverstripe-staticpublisher/code/CachedPHPRedirection.tmpl

24 lines
502 B
Cheetah
Raw Normal View History

2012-09-21 07:47:26 +02:00
<?php
/**
* This is a system-generated PHP script that performs header management for
* a 301 redirection.
*
2012-09-25 10:02:26 +02:00
* @package staticpublisher
2012-09-21 07:47:26 +02:00
*/
define('DESTINATION', '**DESTINATION**');
define('MAX_AGE', 3600);
if(MAX_AGE > 0) {
header("Cache-Control: max-age=" . MAX_AGE);
header("Pragma:");
} else {
header("Cache-Control: no-cache, max-age=0, must-revalidate");
}
header("Expires: " . gmdate('D, d M Y H:i:s', time() + MAX_AGE) . ' GMT');
header("Location: " . DESTINATION, true, 301);
?>