$newurl = $new_location_info["scheme"]."://".$new_location_info["host"].$old_location_info["path"];
$matches = array();
- if (preg_match('/(Location:|URI:)(.*?)\n/', $header, $matches)) {
+ if (preg_match('/(Location:|URI:)(.*?)\n/i', $header, $matches)) {
$newurl = trim(array_pop($matches));
}
if(strpos($newurl,'/') === 0)