From bb4be4d9608100776700582bc8f48391fdfb5cf2 Mon Sep 17 00:00:00 2001 From: Don Naro Date: Thu, 7 Nov 2024 18:43:30 +0000 Subject: [PATCH] add lookahead redirect --- .htaccess | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.htaccess b/.htaccess index 160a3ac2..6235f653 100644 --- a/.htaccess +++ b/.htaccess @@ -49,6 +49,10 @@ RewriteEngine On # Tells the server that all paths in rewrite rules are relative to the root directory RewriteBase / +# Negative lookahead that directs pages to the ansible subdirectory +# except for the pages specified in parenthesis +RedirectMatch permanent "^/((?!index|404|automation.*|ansible_community|collections|community|core.*|galaxy|lint|ecosystem|users|developers|maintainers|platform|ansible-prior*)[^/]+)\.html" "/ansible/$1.html" + ############################################################