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

mck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-website.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 3d6c1852d ninja-fix if versioned docs are not found in latest, try 
stable
3d6c1852d is described below

commit 3d6c1852d62e29725318306c408d08aa86392ec5
Author: mck <[email protected]>
AuthorDate: Sun Nov 5 02:05:18 2023 +0100

    ninja-fix if versioned docs are not found in latest, try stable
---
 content/.htaccess | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/content/.htaccess b/content/.htaccess
index d38e3f423..99e187127 100644
--- a/content/.htaccess
+++ b/content/.htaccess
@@ -18,6 +18,12 @@ RewriteRule ^/?Cassandra/(.*)$ /doc/$1 [R=301,L]
 RewriteCond %{REQUEST_URI} ^/doc/latest/development/(.+).html [NC]
 RewriteRule ^/?doc/latest/development/(.+).html$ /_/development/$1.html 
[R=301,L]
 
+# if versioned docs are not found in latest, try stable
+RewriteCond %{REQUEST_URI} ^/doc/latest/
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule ^/?doc/latest/(.*) /doc/stable/$1 [R=301,L,QSA]
+
 # redirects to new antora in-tree docs
 RewriteCond %{REQUEST_URI} !^/doc/latest/index.html [NC]
 RewriteCond %{REQUEST_URI} !^/doc/latest/cassandra [NC]


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

Reply via email to