blob: c9c5dffc2910230efacc72666e41b42101bb8796 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
require '/www/server/phpinclude/auto_prepend.php';
$stderr = fopen('php://stderr', 'w');
fwrite($stderr, "Got Request: '" . $_SERVER['REQUEST_URI'] . "'\n");
if ($_SERVER['PHP_SELF'] == "/") {
echo 'Testserver root output';
} else if ($_SERVER['PHP_SELF'] == "/temp_redirect") {
it_url::redirect(U("redirect_target", array('type' => 'temporary')), 'temporary');
} else if ($_SERVER['PHP_SELF'] == "/perm_redirect") {
it_url::redirect(U("redirect_target", array('type' => 'permanent')), 'permanent');
} else if ($_SERVER['PHP_SELF'] == "/redirect_loop") {
if ($_REQUEST['num'] > 0)
it_url::redirect(U("redirect_loop", array('num' => $_REQUEST['num'] - 1)));
} else if ($_SERVER['PHP_SELF'] == "/redirect_target") {
echo 'Testserver output after ' . $_REQUEST['type'] . ' redirect';
}
|