You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2020/07/23 18:34:41 UTC

[incubator-mxnet] branch master updated: set website default version to current stable (1.6) version (#18738)

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

zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new e31ad77  set website default version to current stable (1.6) version (#18738)
e31ad77 is described below

commit e31ad77307cea634df9a8959ccff8e56be7611be
Author: Yang Shi <ya...@amazon.com>
AuthorDate: Thu Jul 23 11:33:31 2020 -0700

    set website default version to current stable (1.6) version (#18738)
    
    * set website default version - test redirect
    
    * enable first time redirect on all master website pages
    
    * update test code
    
    * remove unnecessary test code
    
    * fix typo
    
    * delete test code
---
 docs/static_site/src/.htaccess | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/docs/static_site/src/.htaccess b/docs/static_site/src/.htaccess
index 2cf7300..dabc51a 100644
--- a/docs/static_site/src/.htaccess
+++ b/docs/static_site/src/.htaccess
@@ -22,6 +22,12 @@ RewriteOptions AllowNoSlash
   
 </IfModule>
 
+# Set default website version to current stable (v1.6)
+RewriteCond %{REQUEST_URI} !^/versions/
+RewriteCond %{HTTP_REFERER} !mxnet.apache.org
+RewriteCond %{HTTP_REFERER} !mxnet.incubator.apache.org
+RewriteRule ^(.*)$ /versions/1.6/$1 [r=307,L]
+
 # TODO temporary fix for issue #18604
 Redirect 302 /api/r/docs/api/R-package/build/mxnet-r-reference-manual.pdf https://mxnet-public.s3.us-east-2.amazonaws.com/docs/v1.x/mxnet-r-reference-manual.pdf
 Redirect 302 /api/scala/docs/api/ /versions/1.6/api/scala/docs/api/