Skip to content

[Bug] SSL Redirect Leading to "Too Many Redirects" Error #609

@jonas-hoebenreich

Description

@jonas-hoebenreich

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:

  1. Activate the Really Simple SSL plugin.
  2. Add a new domain to a WordPress multisite network.
  3. 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:

  1. Deactivate the Really Simple SSL plugin.
  2. Access the page (which works fine without the plugin).
  3. Reactivate the Really Simple SSL plugin.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions