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 # You may use, modify and redistribute this file under the terms of the
9 # GNU General Public License version 2. (see COPYING.GPL)
10 # Feel free to relicense this code under any Open Source License
11 # approved by the Open Source Initiative.
13 $darkstat = "http://localhost:667";
15 if ($_SERVER['PATH_INFO'] == '') {
16 header("Status: 303 Move!", true);
17 header("Location: " . $_SERVER['PHP_SELF'] . "/", true);
21 function header_cb($proxy, $h) {
27 curl_setopt($proxy, CURLOPT_URL
, $darkstat . $_SERVER['PATH_INFO']);
28 curl_setopt($proxy, CURLOPT_HEADERFUNCTION
, 'header_cb');