This is an automated email from the ASF dual-hosted git repository. zregvart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-website.git
The following commit(s) were added to refs/heads/master by this push: new 653be6e chore: redirect to latest documentation 653be6e is described below commit 653be6e056db1f846b989c0dd8e9c9f02aee2f76 Author: Zoran Regvart <zregv...@apache.org> AuthorDate: Thu Dec 3 23:05:32 2020 +0100 chore: redirect to latest documentation Better than hitting 403 for Antora built documentation, let's redirect to latest version. This time using mod_rewrite to make sure we don't generate a redirect loop. Tested on local Apache HTTPD. --- static/.htaccess | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/static/.htaccess b/static/.htaccess index a1d6d02..3009e72 100644 --- a/static/.htaccess +++ b/static/.htaccess @@ -1,6 +1,7 @@ # Redirect security advisories to new location RewriteEngine on -RewriteRule "security-advisories.data/(.+)$" "security/$1" [R=permanent,L] +RewriteBase "/" +RewriteRule "^security-advisories.data/(.+)$" "security/$1" [R=permanent,L] # Customize what Apache returns to the client in case of an error. # @@ -8,7 +9,7 @@ RewriteRule "security-advisories.data/(.+)$" "security/$1" [R=permanent,L] ErrorDocument 404 /404.html # Redirect /news/... to /blog/... -RewriteRule "news(/.*)$" "/blog$1" [R=permanent,L] +RewriteRule "^news(/.*)$" "/blog$1" [R=permanent,L] # Redirect known links from old website. Not mapped links are commented out. Feel free to edit, if you find something missing. # Redirect 301 /EclipseMilo @@ -1274,6 +1275,15 @@ Redirect 301 /blog/CdcWithCamelAndDebezium/ /blog/2020/05/CdcWithCamelAndDebeziu Redirect 301 /blog/release-3-3-0.html /blog/2020/05/RELEASE-3.3.0/ Redirect 301 /blog/release-3-4-0.html /blog/2020/06/RELEASE-3.4.0/ +# default to latest documentation versions, to make it easier on folk to type in shorter urls +RewriteRule "^components/$" "/components/latest/" [R=permanent,L] +RewriteRule "^camel-spring-boot/$" "/camel-spring-boot/latest/" [R=permanent,L] +RewriteRule "^camel-karaf/$" "/camel-karaf/latest/" [R=permanent,L] +RewriteRule "^camel-k/$" "/camel-k/latest/" [R=permanent,L] +RewriteRule "^camel-kafka-connector/$" "/camel-kafka-connector/latest/" [R=permanent,L] +RewriteRule "^camel-quarkus/$" "/camel-quarkus/latest/" [R=permanent,L] +RewriteRule "^manual/$" "/manual/latest/" [R=permanent,L] + # Disable the pattern matching based on filenames. # # This setting prevents Apache from returning a 404 error as the result