summaryrefslogtreecommitdiffstats
path: root/LayoutTests/http/tests/resources/redirect.php
blob: cfeb37d1c56f4e24fde8f2bb07ad4c4a15cf0f83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
    $url = $_GET['url'];
    $refresh = $_GET['refresh'];
    
    if (isset($refresh)) {
        header("HTTP/1.1 200");
        header("Refresh: $refresh; url=$url");
        return;
    }

    $code = $_GET['code'];
    if (!isset($code))
        $code = 302;
    header("HTTP/1.1 $code");
    header("Location: $url");
?>