February 2020

Solution to so many redirects error executing independent PHP script in a Drupal 8 site running under nginx

The issue is when executing a standalone PHP script in a Drupal 8 site running under nginx gets "The page isn't redirecting properly" error in Firefox and getting this error in Chrome: "This page isn't working [domain] redirected you too many times." but the PHP scripts that executes under Drupal 8 bootstrap don't get this issue. The bug must be on nginx webserver configuration. Investigating the nginx configuration file php_pass.conf that handles my Drupal 8 site PHP scripts: