This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch feat/stage-archive-en-docs
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git

commit 0e84633c8478329d5879cfdedeb028ef397c0530
Author: Erisu <[email protected]>
AuthorDate: Fri Jan 2 15:50:17 2026 +0900

    doc(archive): update .htaccess (step 7)
---
 .htaccess | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/.htaccess b/.htaccess
index 2bb8e0a9de..c486fbd4fa 100644
--- a/.htaccess
+++ b/.htaccess
@@ -600,10 +600,14 @@ RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 RewriteCond %{REQUEST_URI} ^/archive/ [NC]
 RewriteRule .* - [L]
 
-# Prevent redirecting away from English docs
-RewriteCond %{REQUEST_URI} ^/docs/en/ [NC]
+# Allow live English docs (latest + dev)
+RewriteCond %{REQUEST_URI} ^/docs/en/(latest|dev)(/|$) [NC]
 RewriteRule .* - [L]
 
+# Archive all other English versions (permanent)
+RewriteCond %{REQUEST_URI} ^/docs/en/((?:\d+\.(?:\d+\.\d+|x)))(/.*)?$ [NC]
+RewriteRule ^docs/en/((?:\d+\.(?:\d+\.\d+|x)))(/.*)?$ /archive/docs/en/$1$2 
[R=301,L]
+
 # Redirect all non-English documentation to the English version.
 # If the English counterpart is missing, a 404 page will be displayed.
 # Over time, the non-English documentation has fallen out of sync with the 
English version.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to