dtpfia3334 2016-10-30 14:07
浏览 260

Laravel 5.3重定向到https重定向了你太多次了

I just installed https on my server, and if i add a redirect to my non https virtual host i get the error that the page redirected you too many times. Same error if i add it to my htaccess.

Full htaccess with the redirect:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On
RewriteCond %{HTTPS} =off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Any ideas?

Thanks!

  • 写回答

1条回答 默认 最新

  • dpj775835868 2016-10-31 03:09
    关注

    Look at the network panel of your browser's debugger, and set the logs not to clear (Preserve log checkbox in Chrome, Settings > Common > Enable persistent in Firefox). Now clear your cache, visit the desired URL and watch what responses you're actually getting from the server. It should at least give you more information on what redirects you're getting from each response's Location header and help you find the source.

    评论

报告相同问题?

悬赏问题

  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试