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

GitToTheHub pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new ced96ba9e8 fix: redirect non-English latest docs to English (#1534)
ced96ba9e8 is described below

commit ced96ba9e8d1608153c54937882c13d96e6b2016
Author: Manuel Beck <[email protected]>
AuthorDate: Sun Oct 11 08:50:56 2026 +0200

    fix: redirect non-English latest docs to English (#1534)
    
    - The latest-version link on archived German documentation points to 
/docs/de/latest/, which returns a 404 because current documentation is only 
available in English.
    - Add a permanent redirect from non-English /docs/<language>/latest URLs to 
/docs/en/latest, preserving the optional page path. Exclude English URLs to 
prevent redirect loops. The rule supports regional language codes such as zh-tw 
and leaves archived translations accessible.
    - Fixes #1533
---
 www/.htaccess | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/www/.htaccess b/www/.htaccess
index fb68345231..7129dbd065 100644
--- a/www/.htaccess
+++ b/www/.htaccess
@@ -46,6 +46,13 @@ RewriteRule ^archive/ - [L]
 RewriteRule ^docs(?:/[a-z]{2}(?:-[a-z]{2})?)?/?$ \
     {{site.baseurl}}/docs/en/latest/ [R=301,L]
 
+# Latest docs are only available in English. Preserve the requested page path.
+#   /docs/de/latest/                    → /docs/en/latest/
+#   /docs/zh-tw/latest/guide/platforms/ios/ → 
/docs/en/latest/guide/platforms/ios/
+RewriteCond $1 !=en
+RewriteRule ^docs/([a-z]{2}(?:-[a-z]{2})?)/latest(/.*)?$ \
+    {{site.baseurl}}/docs/en/latest$2 [R=301,L]
+
 # Redirect edge and dev docs to latest docs. There is no more dev docs.
 #   /docs/*/edge/* → /docs/en/latest/*
 #   /docs/*/dev/*  → /docs/en/latest/*


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

Reply via email to