forked from centurion-project/Centurion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
30 lines (26 loc) · 809 Bytes
/
index.php
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
if (isset($_SERVER['REDIRECT_URL'])) {
$url = $_SERVER['REDIRECT_URL'];
} else if (isset($_SERVER['REQUEST_URI'])) {
$url = $_SERVER['REQUEST_URI'];
} else {
$url = null;
}
if (isset($_GET['noredirect'])) {
if (null !== $url && $url == '/test_redirect/') {
echo 'Mod_Rewrite works!';
} else {
echo 'Mod_Rewrite does not works';
}
die();
}
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
if (APPLICATION_ENV == 'testing') {
//We allow to run test unit without deleting the status page.
require_once 'index.php_next';
} else {
header('Location: ' . substr($_SERVER['PHP_SELF'], 0, -strlen('index.php')) . 'status/');
die();
}