I encountered a "Too Many Redirects" error while adding a new domain to my WordPress multisite network. After extensive debugging, I identified that the wp_redirect_to_ssl() function in the Really Simple SSL plugin was causing the issue. It seems like the is_ssl() functionwas returning false although SSL was actually already set up.
Steps to Reproduce:
- Activate the Really Simple SSL plugin.
- Add a new domain to a WordPress multisite network.
- Attempt to access the new domain.
Expected Behavior:
The new domain should be accessible without redirect errors.
Actual Behavior:
The new domain results in a "Too Many Redirects" error.
Workaround:
- Deactivate the Really Simple SSL plugin.
- Access the page (which works fine without the plugin).
- Reactivate the Really Simple SSL plugin.
- The page then works without any issues.
Suggested Improvement:
To facilitate easier debugging for others who might encounter this issue, I suggest adding an $x_redirect_by header attribute to the wp_redirect_to_ssl() function. This addition would provide clearer insight into the source of the redirects.
I encountered a "Too Many Redirects" error while adding a new domain to my WordPress multisite network. After extensive debugging, I identified that the wp_redirect_to_ssl() function in the Really Simple SSL plugin was causing the issue. It seems like the is_ssl() functionwas returning false although SSL was actually already set up.
Steps to Reproduce:
Expected Behavior:
The new domain should be accessible without redirect errors.
Actual Behavior:
The new domain results in a "Too Many Redirects" error.
Workaround:
Suggested Improvement:
To facilitate easier debugging for others who might encounter this issue, I suggest adding an $x_redirect_by header attribute to the wp_redirect_to_ssl() function. This addition would provide clearer insight into the source of the redirects.