Skip to content

Redirect Manager Broken for URLs with Query Strings After Apache 2.4.63 UpgradeΒ #3609

@zivkos

Description

@zivkos

Following a recent AEM as a Cloud Service maintenance release β€” documented here:
πŸ”— AEM Maintenance Release Notes β€” and the upgrade to Apache HTTP Server version 2.4.63, a breaking change was introduced in how mod_rewrite handles question marks (?) in URLs.

As a result of this change, Redirect Manager will no longer function correctly when the target URL includes a ? character. Redirects that previously worked with query strings now fail or behave unexpectedly.

Root Cause:

Apache HTTPD 2.4.63 introduced a change in mod_rewrite that alters how the ? character is processed in rewrite and redirect rules. This impacts scenarios where the destination URL contains a query string.

Workaround:

The only currently known workaround is to explicitly add the UnsafeAllow3F flag to the redirect rule.
This flag re-enables support for ? characters in target URLs, allowing the redirect to function as it did prior to the upgrade.

# The Redirect Manager-managed map
RewriteMap site_redirects dbm=sdbm:/tmp/rewrites/site_redirects.map

# If the redirect mapped value contains `.html`
RewriteCond ${site_redirects:$1} !=""
RewriteCond ${site_redirects:$1} \.html
RewriteRule ^(.*)$ ${site_redirects:$1|/} [R=301,L,UnsafeAllow3F]

# If the redirect mapped value does NOT contain `.html`, append it
RewriteCond ${site_redirects:$1} !=""
RewriteCond ${site_redirects:$1} !\.html
RewriteRule ^(.*)$ ${site_redirects:$1|/}.html [R=301,L,UnsafeAllow3F]

Metadata

Metadata

Assignees

No one assigned

    Labels

    need more infoIssue requires more information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions