mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 01:39:28 +02:00
22 lines
No EOL
651 B
Text
22 lines
No EOL
651 B
Text
<?php
|
|
/**
|
|
* To put your Ampache website in maintenance, just rename this file to .maintenance
|
|
* This example redirect your visitors to a default maintenance information page hosted in ampache.org
|
|
*/
|
|
|
|
header("Access-Control-Allow-Origin: *");
|
|
header("Access-Control-Allow-Methods: GET, POST");
|
|
|
|
$domain = $_SERVER['HTTP_HOST'];
|
|
if (empty($domain)) {
|
|
$domain = $_SERVER['SERVER_NAME'];
|
|
}
|
|
$scheme = "http";
|
|
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
|
|
$scheme = "https";
|
|
}
|
|
$fromurl = rawurlencode($scheme . "://" . $domain . $_SERVER[REQUEST_URI]);
|
|
|
|
header("Location: http://ampache.org/maintenance/?from=" . $fromurl);
|
|
exit;
|
|
?> |