Skip to content

Commit b41bfff

Browse files
authored
Merge pull request #66983 from bscott-rh/virt-redirect-loop
Preventing infinite redirect loop for virt content
2 parents 77c3efa + 2255ff2 commit b41bfff

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.s2i/httpd-cfg/01-commercial.conf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,9 +425,15 @@ AddType text/vtt vtt
425425
RewriteRule ^container-platform/(4\.4|4\.5)/authentication/certificates/(.*)$ /container-platform/$1/security/certificates/$2 [NE,R=301]
426426
RewriteRule ^container-platform/(4\.4|4\.5)/authentication/(allowing-javascript-access-api-server|encrypting-etcd|certificate-types-descriptions)\.html$ /container-platform/$1/security/$2\.html [NE,R=301]
427427

428+
429+
# The following rule prevents an infinite redirect loop when browsing to /container-platform/4.14/virt/about_virt/about-virt.html
430+
RewriteRule ^container-platform/4\.14/virt/about_virt/about-virt.html$ - [L]
431+
428432
# OpenShift Virtualization (CNV) catchall redirect; use when CNV releases asynchronously from OCP. Do not change the 302 to a 301.
429433
# When uncommented, this redirects all `virt` directory traffic to the about-virt page.
430-
# To activate the redirects, uncomment the next line and update the version number to the pending release.
434+
# Pay mind to the redirect directly above this which prevents redirect loops.
435+
# To activate the redirects, uncomment the next and previous lines and update the version number to the pending release.
436+
431437
RewriteRule container-platform/4\.14/virt/(?!about-virt\.html)(.+)$ /container-platform/4.14/virt/about_virt/about-virt.html [NE,R=302]
432438

433439
# Serverless Redirects

0 commit comments

Comments
 (0)