forked from phpESP/phpESP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
30 lines (23 loc) · 722 Bytes
/
index.php
File metadata and controls
30 lines (23 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/* $Id$ */
/* vim: set tabstop=4 shiftwidth=4 expandtab: */
if (isset($_SERVER)) $s =& $_SERVER;
//angek: else $s =& $HTTP_SERVER_VARS;
if (isset($s['HTTPS']) && $s['HTTPS'] == 'on') {
$proto = 'https';
$port = 443;
} else {
$proto = 'http';
$port = 80;
}
if (isset($s['SERVER_PORT']) && $s['SERVER_PORT'] != $port) {
$port = ':' . $s['SERVER_PORT'];
} else {
$port = '';
}
$dir = dirname($s['SCRIPT_NAME']) == '/' ? '' :
dirname($s['SCRIPT_NAME']);
$url = sprintf('%s://%s%s%s%s', $proto, $s['SERVER_NAME'], $port,
$dir, '/admin/manage.php');
header("Location: $url");
?>