zstan commented on code in PR #340:
URL: https://github.com/apache/ignite-website/pull/340#discussion_r4397363291


##########
.htaccess:
##########
@@ -203,13 +199,47 @@ RewriteRule ^releases/([2-9][^/]*)(/.*)?$ 
releases/ignite$1/$1$2 [R=301,L]
 RewriteRule ^docs$ /docs/ [R=301,L]
 RewriteRule ^docs/$ docs/index.html [L]
 
+# Index pages are served and canonicalized as directory URLs (".../section/").
+# This also replaces the old mod_alias "Redirect 301 /docs/latest/index", 
which never
+# fired: per-directory RewriteRules run before Redirect directives.
+RewriteRule ^docs/(ignite2/)?latest/(.*/)?index(\.html)?$ 
/docs/ignite2/latest/$2 [R=301,L]
+
+# Pages removed or renamed in later 2.x releases (their old URLs were in 
sitemap.xml
+# until 2025). Both the old /docs/latest/ and the current 
/docs/ignite2/latest/ form
+# resolve in one hop.
+RewriteRule ^docs/(ignite2/)?latest/read-repair/?$ 
/docs/ignite2/latest/key-value-api/read-repair [R=301,L]
+RewriteRule ^docs/(ignite2/)?latest/key-value-api/using-scan-queries/?$ 
/docs/ignite2/latest/key-value-api/using-cache-queries [R=301,L]
+RewriteRule ^docs/(ignite2/)?latest/data-structures/atomic-sequence/?$ 
/docs/ignite2/latest/data-structures/atomic-types [R=301,L]
+RewriteRule ^docs/(ignite2/)?latest/monitoring-metrics/metrics/?$ 
/docs/ignite2/latest/monitoring-metrics/new-metrics-system [R=301,L]
+RewriteRule 
^docs/(ignite2/)?latest/extensions-and-integrations/change-data-capture-extensions/?$
 /docs/ignite2/latest/extensions-and-integrations/change-data-capture/overview 
[R=301,L]
+RewriteRule ^docs/(ignite2/)?latest/tools/visor-cmd/?$ 
/docs/ignite2/latest/tools/control-script [R=301,L]
+RewriteRule ^docs/(ignite2/)?latest/transactions/mvcc/?$ 
/docs/ignite2/latest/key-value-api/transactions [R=301,L]
+RewriteRule 
^docs/(ignite2/)?latest/(SQL/sql-transactions|sql-reference/transactions)/?$ 
/docs/ignite2/latest/SQL/sql-introduction [R=301,L]
+RewriteRule ^docs/(ignite2/)?latest/persistence/snapshots/?$ 
/docs/ignite2/latest/snapshots/snapshots [R=301,L]
+RewriteRule ^docs/(ignite2/)?latest/installation/?$ 
/docs/ignite2/latest/installation/installing-using-zip [R=301,L]
+
 # special handling for /docs/latest: Ignite 2 is the default version on the 
website
 RewriteRule ^docs/latest/?$ docs/ignite2/latest/ [R=301,L]
 RewriteRule ^docs/latest/(.*)$ docs/ignite2/latest/$1 [R=301,L]
 
+# Pre-2025 docs URL scheme (/docs/2.x.y/..., public 2020-08..2025-08): same 
version
+# under /docs/ignite2/ (same idea as the releases/ rule above).
+RewriteRule ^docs/(2\.[0-9]+\.[0-9]+)(/.*)?$ /docs/ignite2/$1$2 [R=301,L]
+
 # add trailing slash for bare ignite2/latest
 RewriteRule ^docs/ignite2/latest$ docs/ignite2/latest/ [R=301,L]
 
+# Trailing-slash handling for the "latest" alias must run BEFORE the internal
+# latest -> version rewrite below: afterwards the generic slash-stripping rule 
and
+# mod_dir's DirectorySlash would redirect to the versioned, robots-blocked 
URL, e.g.
+#   /docs/ignite2/latest/setup/      -> /docs/ignite2/2.18.0/setup.html
+#   /docs/ignite2/latest/quick-start -> /docs/ignite2/2.18.0/quick-start/
+# (keep the version in sync with the rule below)
+RewriteCond %{DOCUMENT_ROOT}/docs/ignite2/2.18.0/$1.html -f

Review Comment:
   seems we forgot to change it after next release, can you add some 
instructions ?  or change "2.18.0" with variable ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to