该页面未在laravel 5中正确重定向

时间:2015-09-26 05:32:34

标签: php laravel

页面正在重定向,网址正在发生变化,但我仍然从Firefox中收到此错误。

  

错误:页面未正确重定向   Firefox检测到服务器以永远无法完成的方式重定向此地址的请求。此问题有时可能是由禁用或拒绝接受cookie引起的。

我已将此代码写入Laravel 5

的路径文件中
$test_login = "/test/";
if (preg_match($test_login,Request::url())){
    echo $actual_link = "http://$_SERVER[HTTP_HOST]/test/login";
    header("Location: ".$actual_link);
    die();
}else{
    echo "false";
}

0 个答案:

没有答案