title: Too many redirects with symfony 4
body: <p>I have published a symfony 4 website which I can visit on the domain without any problems. Most people however, get the error:</p>
  
  <blockquote>
    <p>Too many redirects</p>
  </blockquote>
  
  <p>Reading about this, I believe there is a redirect loop somehow. The problem is, I cannot recreate the issue myself, so I cannot test different solutions. I do not understand why I don't have the issue, while others do. I am using Apache with the following .htaccess file: </p>
  
  <pre><code>&lt;IfModule mod_negotiation.c&gt;
      Options -MultiViews
  &lt;/IfModule&gt;
  
  &lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
  
      RewriteCond %{HTTPS} off
      RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
      RewriteCond %{HTTP_HOST} !^www\. [NC]
      RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  
      RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
      RewriteRule ^(.*) - [E=BASE:%1]
  
      RewriteCond %{HTTP:Authorization} .
      RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  
      RewriteCond %{ENV:REDIRECT_STATUS} ^$
      RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
  
      RewriteCond %{REQUEST_FILENAME} -f
      RewriteRule ^ - [L]
  
      RewriteRule ^ %{ENV:BASE}/index.php [L]
  &lt;/IfModule&gt;
  
  &lt;IfModule !mod_rewrite.c&gt;
      &lt;IfModule mod_alias.c&gt;
          RedirectMatch 302 ^/$ /index.php/
      &lt;/IfModule&gt;
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>Can you see if there is something wrong? And also, why do I not have the same issue? </p>
  
  <p><strong>Edit:</strong> another strange thing is: the people that see the error CAN visit the domain by going to www.domain.com/page (where this is an actual page). It's just the homepage they cannot visit directly. When they 'enter' from a different page they can visit the homepage. </p>
  
  <p><strong>Edit2:</strong> running a test on <a href="http://www.redirect-checker.org" rel="nofollow noreferrer">www.redirect-checker.org</a> this is the result: </p>
  
  <blockquote>
    <p>Result</p>
    
    <p><a href="https://www.studiosaam.nl" rel="nofollow noreferrer">https://www.studiosaam.nl</a> 302 Found /?_locale=de 302 Found
    /?_locale=de 302 Found /?_locale=de 302 Found /?_locale=de 302 Found
    /?_locale=de 302 Found /?_locale=de 302 Found /?_locale=de 302 Found
    /?_locale=de 500 Internal Server Error Problems found:</p>
    
    <p>Too many redirects. Please try to reduce your number of redirects for <a href="https://www.studiosaam.nl" rel="nofollow noreferrer">https://www.studiosaam.nl</a>. Actually you use 8 Redirects. Ideally
    you should not use more than 3 Redirects in a redirect chain. More
    than 3 redirections will produce unnecessary load on your server and
    reduces speed, which ends up in bad user experience.
        You use a 302 redirect. This means, that the actually content is temporary not reachable and will come back soon. To use a 302
    redirection for generally moved pages is a bad idea. Search engine bot
    might not follow it or handle it as temporary. For SEO this is also a
    bad idea, because no link juice will be transferred to the linked
    page.</p>
  </blockquote>