title: nginx - rewrite or internal redirection cycle while internally redirecting to "/index.html"
body: <p>I cannot figure out why this error is happening: <em>"rewrite or internal redirection cycle while internally redirecting to "/index.html""</em></p>
  
  <p>I found a <strong><a href="https://stackoverflow.com/questions/18321325/nginx-rewrite-or-internal-redirection-cycle-while-internally-redirecting-resul">similar post</a></strong> and tried various recommendations based on what I read, but to no avail.</p>
  
  <p>Here is my nginx config.  Any help would be appreciated!</p>
  
  <pre><code>server {
      listen 80 default_server;
      listen [::]:80 default_server ipv6only=on;
  
      root /usr/share/nginx/html/public;
      index index.php;
  
      # Make site accessible from http://localhost/
      server_name ourdomain.com;
  
      location @handler {
          rewrite / /index.php
      }
  
      location / {
          try_files $uri $uri/ /index.php?$query_string;
      }
  
      location ~ .php$ {
          fastcgi_split_path_info ^(.+.php)(/.+)$;
          fastcgi_pass unix:/var/run/php5-fpm.sock;
          fastcgi_index index.php;
          include fastcgi_params;
          # add the following line in for added security.
          try_files $uri =403;
      }
  }
  </code></pre>