de0d3f2d80bec8a5efd64a5e91bc08476283a367
2 # copyright (c) 2011 Malte S. Stretz
4 # This is a simple proxy script to test the proper implementation of
5 # relative hrefs in combination with eg. lighttpd 1.4 which doesn't
6 # support the features of mod_proxy_core yet.
8 $darkstat = "http://localhost:667";
10 if ($_SERVER['PATH_INFO'] == '') {
11 header("Status: 303 Move!", true);
12 header("Location: " . $_SERVER['PHP_SELF'] . "/", true);
16 function header_cb($proxy, $h) {
22 curl_setopt($proxy, CURLOPT_URL
, $darkstat . $_SERVER['PATH_INFO']);
23 curl_setopt($proxy, CURLOPT_HEADERFUNCTION
, 'header_cb');