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

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


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

commit 38a5887324c56b3586ba6cf40347d39862b18e09
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