You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mc...@apache.org on 2021/08/03 19:24:46 UTC
[cassandra-website] branch asf-staging updated: Redirect old
in-tree docs to include the /cassandra/ section in the URL
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 15202bb Redirect old in-tree docs to include the /cassandra/ section in the URL
15202bb is described below
commit 15202bb59d20cd838668c55dc4f8d24f3f4bd436
Author: mck <mc...@apache.org>
AuthorDate: Tue Aug 3 21:23:42 2021 +0200
Redirect old in-tree docs to include the /cassandra/ section in the URL
---
content/.htaccess | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/content/.htaccess b/content/.htaccess
index c87afe0..75cdd2c 100755
--- a/content/.htaccess
+++ b/content/.htaccess
@@ -1,17 +1,19 @@
-RewriteEngine On
+<IfModule mod_rewrite.c>
+ RewriteEngine On
-RewriteCond %{HTTPS} !=on
-RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
+ # always https
+ RewriteCond %{HTTPS} !=on
+ RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
-RedirectMatch 301 "^/$" "/_/index.html"
+ # frontpage
+ RedirectMatch 301 "^/$" "/_/index.html"
-RewriteCond %{REQUEST_URI} !^/doc/.*
-RewriteCond %{REQUEST_URI} ^(.*)/$
-RewriteRule ^(.*)/$ /_/$1.html [R=301,L]
+ # redirect old style top-level URLs
+ RewriteCond %{REQUEST_URI} !^/doc/.*
+ RewriteCond %{REQUEST_URI} ^(.*)/$
+ RewriteRule ^(.*)/$ /_/$1.html [R=301,L]
-<IfModule mod_rewrite.c>
- RewriteEngine on
Redirect 301 /blog.html /_/blog.html
Redirect 301 /blog/2021/04/19/cass-world-party-speakers.html /blog/Speakers-Announced-for-April-28-Cassandra-4.0-World-Party.html
Redirect 301 /blog/2021/04/12/cass-changelog_6.html /blog/Apache-Cassandra-Changelog-6-April-2021.html
@@ -32,4 +34,9 @@ RewriteRule ^(.*)/$ /_/$1.html [R=301,L]
Redirect 301 /blog/2018/10/17/finding_bugs_with_property_based_testing.html /blog/Finding-Bugs-in-Cassandra's-Internals-with-Property-based-Testing.html
Redirect 301 /blog/2018/08/21/testing_apache_cassandra.html /blog/Testing-Apache-Cassandra-4.html
Redirect 301 /blog/2018/08/07/faster_streaming_in_cassandra.html /blog/Hardware-bound-Zero-Copy-Streaming-in-Apache-Cassandra-4.html
+
+ # redirect old style in-tree docs URLs
+ RewriteCond %{REQUEST_URI} !^/doc/(3.11|4.0)/cassandra/.*
+ RewriteCond %{REQUEST_URI} ^/doc/(3.11|4.0)/(.*)$
+ RewriteRule ^/doc/$1/cassandra/$2 [R=301,L]
</IfModule>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org