This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix redirection issues; set default version to master (#13796)
- Loading branch information
1 parent
44c21bd
commit 71740ae
Showing
1 changed file
with
21 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
RewriteEngine on | ||
RewriteRule ^get_started/why_mxnet.html$ /faq/why_mxnet.html [R=301,L] | ||
RewriteRule ^get_started.*$ /install/ [R=301,L] | ||
RewriteRule ^how_to.*$ /faq/ [R=301,L] | ||
RewriteRule ^api/python/symbol.html$ /api/python/symbol/symbol.html [R=301,L] | ||
RewriteRule ^community/index.html$ /community/contribute.html [R=301,L] | ||
RewriteRule .* - [E=default_version:/versions/master] | ||
RewriteRule ^get_started/why_mxnet.html$ %{ENV:default_version}/faq/why_mxnet.html [R=301,L] | ||
RewriteRule ^get_started.*$ %{ENV:default_version}/install/ [R=301,L] | ||
RewriteRule ^how_to.*$ %{ENV:default_version}/faq/ [R=301,L] | ||
RewriteRule ^api/python/symbol.html$ %{ENV:default_version}/api/python/symbol/symbol.html [R=301,L] | ||
RewriteRule ^community/index.html$ %{ENV:default_version}/community/contribute.html [R=301,L] | ||
|
||
# Navigation bar redirects to latest info | ||
RewriteRule ^versions/[^\/]+/architecture/.*$ /architecture/ [R=301,L] | ||
RewriteRule ^versions/[^\/]+/community/.*$ /community/ [R=301,L] | ||
RewriteRule ^versions/[^\/]+/faq/.*$ /faq/ [R=301,L] | ||
RewriteRule ^versions/[^\/]+/gluon/.*$ /gluon/ [R=301,L] | ||
RewriteRule ^versions/[^\/]+/install/.*$ /install/ [R=301,L] | ||
RewriteRule ^versions/[^\/]+/tutorials/(.*)$ /tutorials/$1 [R=301,L] | ||
RewriteRule ^versions\/[0-9.]+\/architecture/(.*)$ %{ENV:default_version}/architecture/$1 [R=301,L] | ||
RewriteRule ^versions\/[0-9.]+\/community/(.*)$ %{ENV:default_version}/community/$1 [R=301,L] | ||
RewriteRule ^versions\/[0-9.]+\/faq/(.*)$ %{ENV:default_version}/faq/$1 [R=301,L] | ||
RewriteRule ^versions\/[0-9.]+\/gluon/(.*)$ %{ENV:default_version}/gluon/$1 [R=301,L] | ||
RewriteRule ^versions\/[0-9.]+\/install/(.*)$ %{ENV:default_version}/install/$1 [R=301,L] | ||
RewriteRule ^versions\/[0-9.]+\/tutorials/(.*)$ %{ENV:default_version}/tutorials/$1 [R=301,L] | ||
|
||
# Redirect navbar APIs that did not exist | ||
RewriteRule ^versions/0.11.0/api/python/contrib/onnx.html /error/api.html [R=301,L] | ||
RewriteRule ^versions/0.12.1/api/python/contrib/onnx.html /error/api.html [R=301,L] | ||
RewriteRule ^versions/1.0.0/api/python/contrib/onnx.html /error/api.html [R=301,L] | ||
RewriteRule ^versions/1.1.0/api/python/contrib/onnx.html /error/api.html [R=301,L] | ||
RewriteRule ^versions/0.11.0/api/python/contrib/onnx.html %{ENV:default_version}/error/api.html [R=301,L] | ||
RewriteRule ^versions/0.12.1/api/python/contrib/onnx.html %{ENV:default_version}/error/api.html [R=301,L] | ||
RewriteRule ^versions/1.0.0/api/python/contrib/onnx.html %{ENV:default_version}/error/api.html [R=301,L] | ||
RewriteRule ^versions/1.1.0/api/python/contrib/onnx.html %{ENV:default_version}/error/api.html [R=301,L] | ||
|
||
RewriteRule ^versions/0.11.0/api/clojure/.*$ /error/api.html [R=301,L] | ||
RewriteRule ^versions/0.12.1/api/clojure/.*$ /error/api.html [R=301,L] | ||
RewriteRule ^versions/1.0.0/api/clojure/.*$ /error/api.html [R=301,L] | ||
RewriteRule ^versions/1.1.0/api/clojure/.*$ /error/api.html [R=301,L] | ||
RewriteRule ^versions/1.2.1/api/clojure/.*$ /error/api.html [R=301,L] | ||
RewriteRule ^versions/0.11.0/api/clojure/.*$ %{ENV:default_version}/error/api.html [R=301,L] | ||
RewriteRule ^versions/0.12.1/api/clojure/.*$ %{ENV:default_version}/error/api.html [R=301,L] | ||
RewriteRule ^versions/1.0.0/api/clojure/.*$ %{ENV:default_version}/error/api.html [R=301,L] | ||
RewriteRule ^versions/1.1.0/api/clojure/.*$ %{ENV:default_version}/error/api.html [R=301,L] | ||
RewriteRule ^versions/1.2.1/api/clojure/.*$ %{ENV:default_version}/error/api.html [R=301,L] | ||
|
||
ErrorDocument 404 https://mxnet.incubator.apache.org/error/404.html |