The Drupal Redirect module normalizer strips empty query strings from URLs.

For example:
/page? → /page

When Drupal is integrated with Akamai CDN and the Redirect module is enabled, this behavior can cause issues. If the requested page is not cached in Akamai and an empty query string is present, the request can result in a “Too Many Redirects” error.

Steps to Reproduce

  1. Clear the Akamai cache for a specific page.
  2. Access the page using the site’s custom domain with an empty query string appended (for example: /page?).

Root Cause
Akamai processes the request with the empty query string(sometime for WAF security check), while Drupal’s Redirect module normalizes the URL by stripping it. This mismatch between Akamai and Drupal leads to a redirect loop when the page is not cached.

reference

Solution
Ensure that empty query strings are explicitly preserved, even when no parameters are present. Adding or allowing the empty query string consistently prevents the redirect loop and avoids the “Too Many Redirects” error.

CommentFileSizeAuthor
image (37).png16.75 KBcbuvaneswaran

Issue fork redirect-3588394

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

cbuvaneswaran created an issue. See original summary.

cbuvaneswaran’s picture

Status: Active » Patch (to be ported)

Hi Team,

I have updated the normalizer code and added back the empty query string in the URL. Please review my patch in issue fork and merge.

Let me know if you any queries.

Regards,
Buvaneswaran