Apache 2.4 RewriteRule with anchor not redirecting properly

Issue

Rewrite rules on Apache 2.4 web server that attempt to redirect to URLs with anchors aren't being redirected properly.  For example:

RewriteRule ^/test.html /test.html#anchor [R=301,L]

Environment

AEM Dispatcher module installed in Apache HTTP Server 2.4

Resolution

To avoid encoding the # character, add the NE flag to the rewrite rules:

RewriteRule ^/test.html /test.html#anchor [NE,R=301,L]

 Adobe

Dapatkan bantuan lebih cepat dan lebih mudah

Pengguna baru?

Adobe MAX 2024

Adobe MAX
Konferensi Kreativitas

14–16 Oktober Miami Beach dan online

Adobe MAX

Konferensi Kreativitas

14–16 Oktober Miami Beach dan online

Adobe MAX 2024

Adobe MAX
Konferensi Kreativitas

14–16 Oktober Miami Beach dan online

Adobe MAX

Konferensi Kreativitas

14–16 Oktober Miami Beach dan online