From 94f9d872d91c1fae6b4e24f211231ba848d0d620 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Tue, 12 Sep 2017 16:16:08 -0600 Subject: [PATCH] Add redirect for API reference The URLs of some API references was changed in favor of using the official service types (project-config commit 252673743a). This commit adds redirect for them. Redirects for shared-file-system and cluster do not need to use RedirectMatch. Redirect directive is enough. Also reorganizes redirect entries. Change-Id: I8114b28adba7c5fa65566632b3b347ace433251b --- www/static/.htaccess | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/www/static/.htaccess b/www/static/.htaccess index b7a974780..7c57dc247 100644 --- a/www/static/.htaccess +++ b/www/static/.htaccess @@ -1,3 +1,21 @@ +# Redirect the old API reference URLs to the new location with official service types +redirect 301 /api-ref/networking/ /api-ref/network/ +redirect 301 /api-ref/object-storage/ /api-ref/object-store/ +redirect 301 /api-ref/messaging/ /api-ref/message/ +redirect 301 /api-ref/shared-file-systems/ /api-ref/shared-file-system/ +redirect 301 /api-ref/resource-cluster/ /api-ref/clustering/ + +# -------------------------------------------- +# Redirect related to API ref per project team +# -------------------------------------------- +# Redirect Block Storage API v1 to v2 and v3 landing +redirect 301 /api-ref/block-storage/v1/index.html /api-ref/block-storage/index.html +# Redirect Networking extensions to landing +redirect 301 /api-ref/networking/v2-ext/ /api-ref/network/index.html + +# ------------------------------------------------------------- +# Redirect from centralized API ref to API ref per project team +# ------------------------------------------------------------- # Redirect for the new file name for complete reference page redirect 301 /api-reference.html /api-guide/quick-start/index.html redirect 301 /api-specs.html /api-ref-guides.html @@ -20,8 +38,6 @@ redirect 301 /api-ref-baremetal-v1.html /api-ref/baremetal/index.html # Redirect WADL-based Block Storage API docs to in-tree docs redirect 301 /api-ref-blockstorage-v1.html /api-ref/block-storage/index.html redirect 301 /api-ref-blockstorage-v2.html /api-ref/block-storage/index.html -# Redirect Block Storage API v1 to v2 and v3 landing -redirect 301 /api-ref/block-storage/v1/index.html /api-ref/block-storage/index.html # Redirect WADL-based Identity API docs to in-tree docs redirect 301 /api-ref-identity-v2.html /api-ref/identity/v2/index.html redirect 301 /api-ref-identity-admin-v2.html /api-ref/identity/v2-admin/index.html @@ -32,21 +48,15 @@ redirect 301 /api-ref-identity-v3-ext.html /api-ref/identity/v3-ext/index.html redirect 301 /api-ref-image-v1.html /api-ref/image/index.html redirect 301 /api-ref-image-v2.html /api-ref/image/index.html # Redirect WADL-based Networking API docs to in-tree docs -redirect 301 /api-ref-networking-v2.html /api-ref/networking/v2/index.html -redirect 301 /api-ref-networking-v2-ext.html /api-ref/networking/v2/index.html -# Redirect Networking extensions to landing -redirect 301 /api-ref/networking/v2-ext/ /api-ref/networking/index.html +redirect 301 /api-ref-networking-v2.html /api-ref/network/v2/index.html +redirect 301 /api-ref-networking-v2-ext.html /api-ref/network/v2/index.html # Redirect WADL-based Object Storage API docs to in-tree docs -redirect 301 /api-ref-objectstorage-v1.html /api-ref/object-storage/index.html +redirect 301 /api-ref-objectstorage-v1.html /api-ref/object-store/index.html # Redirect Orchestration API redirect 301 /api-ref-orchestration-v1.html /api-ref/orchestration/index.html # Redirect Shared File Systems API v2 redirect 301 /api-ref-share-v2.html /api-ref/shared-file-system/index.html # Redirect Shared File Systems API v1 redirect 301 /api-ref-share-v1.html /api-ref/shared-file-system/index.html -# Redirect "shared-file-systems" (plural) links to official "shared-file-system" (singular) -redirectmatch 301 /api-ref/shared-file-systems/(.*) /api-ref/shared-file-system/$1 # Redirect Telemetry (ceilometer only) API redirect 301 /api-ref-telemetry-v2.html https://docs.openstack.org/ceilometer/latest/webapi/v2.html -# Redirect senlin old service-type resource-cluster to clustering -redirectmatch 301 /api-ref/resource-cluster/(.*) /api-ref/clustering/$1