Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel重定向到[https]而不是[http]_Php_Laravel - Fatal编程技术网

Php Laravel重定向到[https]而不是[http]

Php Laravel重定向到[https]而不是[http],php,laravel,Php,Laravel,请帮我解答下面的问题 我使用的是laravel版本5 1) 在分页中 {!! $list->appends($form)->links() !!} 2) 在行动上, return redirect()->action('toute@method', [$testId]); 两者都重定向到我[https]而不是[http] 谢谢大家! 我认为这段代码值得一试 在AppServiceProvider.php中,您可以添加以下内容: \URL::forceSchema('http

请帮我解答下面的问题

我使用的是laravel版本5

1) 在分页中

{!! $list->appends($form)->links() !!}
2) 在行动上,

return redirect()->action('toute@method', [$testId]);
两者都重定向到我[https]而不是[http]


谢谢大家!

我认为这段代码值得一试

AppServiceProvider.php
中,您可以添加以下内容:

\URL::forceSchema('http');

希望有帮助。

通过在中间件中添加以下行来解决问题

$request->server->set('HTTPS', 'off');

你到底为什么要剥去https你可以在
上抢夺。htaccess
重定向规则。查看你的
.env
文件。检查
APP\u URL
您是否使用带有chrome和.dev域的本地测试环境?然后chrome强制您使用安全连接。可以找到更多信息