Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
improved redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmarkham committed Jan 17, 2019
1 parent 9f7c4de commit d801e8e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions docs/build_version_doc/artifacts/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ RewriteRule ^get_started/why_mxnet.html$ %{ENV:default_version}/faq/why_mxnet.ht
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]
RewriteRule ^(?:versions\/[^\/]+\/)?community/index.html$ %{ENV:default_version}/community/contribute.html [R=301,L]

# Navigation bar redirects to latest info
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]
RewriteCond %{ENV:default_version}#\/$1 !^([^#]+)#\1$
RewriteRule ^(versions\/[^\/]+)?(?:\/)?(faq|community|install|gluon|tutorials|architecture)(.*)?$ %{ENV:default_version}/$2$3 [R=301,L]

# Redirect navbar APIs that did not exist
RewriteRule ^versions/0.11.0/api/python/contrib/onnx.html %{ENV:default_version}/error/api.html [R=301,L]
Expand Down

0 comments on commit d801e8e

Please sign in to comment.