How to Fix Laravel HTTPS Redirect Loop on Amazon Elastic Beanstalk/Load Balancer/Proxy

If you are forcing HTTPS on routes in Laravel but are having issues with a redirect loop and your app is behind a proxy, load balancer, or something like Elastic Beanstalk, try adding this to your .htaccess file: #Fixes HTTPS Redirect Loop SetEnvIfNoCase X-FORWARDED-PROTO “^https$” HTTPS Many load balancers will accept HTTPS traffic and forward […]