Probabile che non funzionasse perché hai scritto Location (L maiuscola) invece di location header("location:". $_SERVER['HTTP_REFERER']);