Answers.Body: <p>I was having the same issue and stumbled upon an answer to a very similar problem, although it didn't appear to be random like mine and yours. This is a pretty old issue, so not sure if my "answer" helps. All I did was navigate to CiviCRM >> Administer >> CiviContribute >> CiviContribute Component Settings. Set 'Default invoice payment page' field to the contribution page that was causing the "too many redirects" when we pressed Confirm. It was previously pointing to a contribution page associated with an expired campaign, which doesn't explain at all why the redirects error appeared to be random. We are running Wordpress 5.2.3 and CiviCRM 5.12.4.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-01T16:08:07.810Z
Answers.Text: I would say that this answer still doesn't solve our problem. We have upgraded to WordPress 5.2.4 and CiviCRM 5.18.4 in the meantime and all tests passed, including a live contribution (iATS is our payment processor). I have tested a few times since and once I got "too many redirects" once again, despite my suggested "answer." We also use the W3 Total Cache optimization with Browser Cache DISabled. I did notice we also had WP Optimize plugin installed, which might also be a problem. I de-activated that. Maybe that is causing an issue as two optimizers is obviously redundant.
Answers.UserDisplayName: Karl Rudnick
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-10-31T22:13:46.487Z
Answers.LastActivityDate: 2019-10-31T22:13:46.487Z
Answers.UserDisplayName: Karl Rudnick
Body: <p>We have a contribution page via an embedded short code that, upon submit, intermittently throws a "too many redirects" browser error.  When this happens, the contribution is not written to Civi, nor does anything get to auth.net.  Contributions do work successfully for some visitors, but not for others. For example, we can have success on a desktop, but then retest immediately on a cell phone and get the error message. Doesn't seem to matter whether the cell phone is on the same network as the desktop or if it's on it's mobile network.  Also, doesn't seem to matter whether the user is logged in to admin or not.  Clearing cookies or cache doesn't solve the issue.</p>
  
  <p>We're running CiviCRM 4.7.15 on a WordPress (4.8.1) site. The site has a Let's Encrypt SSL and both the Wordpress general settings and the Civi base URL are the same (https).  Server rewrite rules also rewrites to https.  Caching is handled through CloudFlare and W3 Total Cache plugin. We're using authorize.net for our payment processor.  All auth.net ip's are whitelisted in WordFence as well as CloudFlare.  </p>
  
  <p>Appreciate any suggestions or advice.  We're stumped!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-01T21:17:16.047Z
Comments.Text: Is it a www vs bare url difference? Is there anything related to rewriting urls in .htaccess? Or possibly a conflict with civi's own SSL redirection under Admin - System Settings - Resource URLs? Maybe try turning the latter off?
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-01-01T22:37:09.480Z
Comments.Text: Thanks Demerit. Doesn't appear to be an issue with www vs bare url or htaccess.  We don't have the force SSL turned on, either.
Comments.UserDisplayName: Greg
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-01T07:59:30.973Z
Comments.Text: @Greg check site_url and home_url in options table in wordpres database. if its different than civicrm 'CIVICRM_UF_BASEURL' defined in civicrm.settings.php then goes to redirect loop.
Comments.UserDisplayName: Sunil Pawar
Tags: <civicontribute>
Title: Error message on contribution: too many redirects
ThreadText: # Error message on contribution: too many redirects
  
  (Asked by: username_0 on 2017-12-31)
  
  We have a contribution page via an embedded short code that, upon submit, intermittently throws a "too many redirects" browser error. When this happens, the contribution is not written to Civi, nor does anything get to auth.net. Contributions do work successfully for some visitors, but not for others. For example, we can have success on a desktop, but then retest immediately on a cell phone and get the error message. Doesn't seem to matter whether the cell phone is on the same network as the desktop or if it's on it's mobile network. Also, doesn't seem to matter whether the user is logged in to admin or not. Clearing cookies or cache doesn't solve the issue.
  
  We're running CiviCRM 4.7.15 on a WordPress (4.8.1) site. The site has a Let's Encrypt SSL and both the Wordpress general settings and the Civi base URL are the same (https). Server rewrite rules also rewrites to https. Caching is handled through CloudFlare and W3 Total Cache plugin. We're using authorize.net for our payment processor. All auth.net ip's are whitelisted in WordFence as well as CloudFlare.
  
  Appreciate any suggestions or advice. We're stumped!
  
  **Tags:** civicontribute
  
  > **Comments:**
  > **username_1**: Is it a www vs bare url difference? Is there anything related to rewriting urls in .htaccess? Or possibly a conflict with civi's own SSL redirection under Admin - System Settings - Resource URLs? Maybe try turning the latter off?  
  > **username_0**: Thanks username_1. Doesn't appear to be an issue with www vs bare url or htaccess.  We don't have the force SSL turned on, either.  
  > **username_2**: @username_0 check site_url and home_url in options table in wordpres database. if its different than civicrm 'CIVICRM_UF_BASEURL' defined in civicrm.settings.php then goes to redirect loop.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2019-10-31. Score: 2
  
  I was having the same issue and stumbled upon an answer to a very similar problem, although it didn't appear to be random like mine and yours. This is a pretty old issue, so not sure if my "answer" helps. All I did was navigate to CiviCRM >> Administer >> CiviContribute >> CiviContribute Component Settings. Set 'Default invoice payment page' field to the contribution page that was causing the "too many redirects" when we pressed Confirm. It was previously pointing to a contribution page associated with an expired campaign, which doesn't explain at all why the redirects error appeared to be random. We are running Wordpress 5.2.3 and CiviCRM 5.12.4.
  
  > **Comments:**
  > **username_3**: I would say that this answer still doesn't solve our problem. We have upgraded to WordPress 5.2.4 and CiviCRM 5.18.4 in the meantime and all tests passed, including a live contribution (iATS is our payment processor). I have tested a few times since and once I got "too many redirects" once again, despite my suggested "answer." We also use the W3 Total Cache optimization with Browser Cache DISabled. I did notice we also had WP Optimize plugin installed, which might also be a problem. I de-activated that. Maybe that is causing an issue as two optimizers is obviously redundant.  
  
  ---
  
  