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

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


The following commit(s) were added to refs/heads/asf-staging by this push:
     new 8f97a8694 Update .htaccess
8f97a8694 is described below

commit 8f97a86948f1450ec64b325e8cd69aad0b38193e
Author: Casion <[email protected]>
AuthorDate: Thu May 26 21:10:45 2022 +0800

    Update .htaccess
---
 .htaccess | 38 ++++++++++++++++++++++++++++++++------
 1 file changed, 32 insertions(+), 6 deletions(-)

diff --git a/.htaccess b/.htaccess
index ae8cd1e2e..d1de280cb 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,9 +1,35 @@
-Options +FollowSymLinks
 RewriteEngine On
+RewriteBase /
 
-# Redirect to the latest release
-RewriteRule ^latest$ 
https://nightlies.apache.org/directory/apacheds/2.0.0.AM26/ [QSA,L]
-RewriteRule ^latest/(.*)$ 
https://nightlies.apache.org/directory/apacheds/2.0.0.AM26/$1 [QSA,L]
 
-# Redirect everything else
-RewriteRule ^(.*)$ https://nightlies.apache.org/directory/apacheds/$1 [QSA,L]
+RewriteCond %{HTTP_HOST} ^(www\.)?ignite.incubator.apache.org$
+RewriteRule ^/?(.*)$ https://ignite.apache.org/$1 [L,R=301]
+
+RewriteCond %{SERVER_PORT} 80
+RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R=301,L]
+
+RewriteRule ^releases/latest/(.*)$ /releases/2.13.0/$1 [L]
+RewriteRule ^releases/mobile/(.*)$ /releases/latest/javadoc/$1 [R=301,L]
+#redirects all 404 pages under api doc path, to it corresponding index
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule ^releases/(.*)/(javadoc|scaladoc|cppdoc|dotnetdoc)/(.*)$ 
/releases/latest/$2/ [R=301,L]
+
+#rewrite for user docs .html files
+
+
+RewriteRule ^docs/?$ /docs/latest/ [R=301,L]
+RewriteRule ^docs/latest$ /docs/latest/ [R=301,L]
+RewriteRule ^docs/latest/(.*)$ /docs/2.13.0/$1 [L]
+
+#removes trailing slash under docs
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule ^docs/(.*)/$ /docs/$1 [L,R=301] 
+
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteCond %{REQUEST_FILENAME}\.html -f
+RewriteRule ^docs/(.*)$ /docs/$1.html [NC]
+
+
+
+ErrorDocument 404 /404.html


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

Reply via email to