2017-07-18 18:40:06 -04:00
|
|
|
{# NOTE(dhellmann): This file is not in a series directory,
|
|
|
|
so we need to set the series name ourselves. #}
|
2017-06-25 11:21:41 -04:00
|
|
|
{% set series = 'latest' %}
|
|
|
|
{% set projects = PROJECT_DATA[series] %}
|
|
|
|
|
2017-09-29 16:06:38 -04:00
|
|
|
{# Macro to generate redirects for anything under a specific directory to a
|
|
|
|
given page, allowing the path to not have a trailing slash.
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
path -- the partial regex representing the input path (should not end in /)
|
|
|
|
result -- the result pattern
|
|
|
|
code -- the response code (defaults to 301)
|
|
|
|
#}
|
|
|
|
{% macro dir_to_page(path, result, code=301) -%}
|
|
|
|
redirectmatch {{ code }} ^{{ path }}/?$ {{ result }}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{# Macro to generate redirects for anything under a given path to a
|
|
|
|
given page, allowing the path to not have a trailing slash.
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
path -- the partial regex representing the input path (should not end in /)
|
|
|
|
result -- the result pattern
|
|
|
|
code -- the response code (defaults to 301)
|
|
|
|
#}
|
|
|
|
{% macro path_to_page(path, result, code=301) -%}
|
|
|
|
redirectmatch {{ code }} ^{{ path }}($|/.*$) {{ result }}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{# Macro to generate redirects for a given path to a location under
|
|
|
|
the RELEASED_SERIES. The result argument should be the sub-directory
|
|
|
|
under RELEASED_SERIES.
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
path -- the partial regex representing the input path (should not end in /)
|
|
|
|
result -- the subdirectory under /RELEASED_SERIES, (should start with /)
|
|
|
|
code -- the response code (defaults to 301)
|
|
|
|
#}
|
|
|
|
{% macro path_to_released_series(path, result, code=301) -%}
|
|
|
|
{{ path_to_page(path, '/' + RELEASED_SERIES + result, code) }}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
|
|
|
{# Macro to generate redirects deep links under a page.
|
|
|
|
|
|
|
|
A trailing catch-all pattern is appended and can be referenced in
|
|
|
|
the result value.
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
path -- the partial regex representing the input path (should not end in /)
|
|
|
|
result -- the result pattern (may include references to groups from path)
|
|
|
|
code -- the response code (defaults to 301)
|
|
|
|
#}
|
|
|
|
{% macro deep_links(path, result, code=301) -%}
|
2017-11-08 14:15:05 -05:00
|
|
|
redirectmatch {{ code }} ^{{ path }}(?![^/])/?(.*)$ {{ result }}
|
2017-09-29 16:06:38 -04:00
|
|
|
{%- endmacro %}
|
|
|
|
|
2018-03-23 08:55:49 -05:00
|
|
|
{# Macro to handle project renames.
|
|
|
|
|
|
|
|
Arguments:
|
|
|
|
old -- The previous name of the project.
|
|
|
|
new -- The new name of the project.
|
|
|
|
#}
|
|
|
|
{% macro rename_project(old, new) -%}
|
|
|
|
{{ deep_links('/' + old, '/' + new + '/$1') }}
|
|
|
|
{%- endmacro %}
|
|
|
|
|
2017-07-18 17:45:02 -04:00
|
|
|
# Redirect old top-level HTML pages to the version under most recent
|
2017-08-09 16:57:38 +02:00
|
|
|
# full release.
|
2017-09-29 16:06:38 -04:00
|
|
|
redirectmatch 301 ^/$ /{{ RELEASED_SERIES }}/
|
|
|
|
redirectmatch 301 ^/index.html$ /{{ RELEASED_SERIES }}/
|
|
|
|
redirectmatch 301 ^/openstack-projects.html$ /{{ RELEASED_SERIES }}/projects.html
|
|
|
|
redirectmatch 301 ^/language-bindings.html$ /{{ RELEASED_SERIES }}/language-bindings.html
|
2017-07-18 17:45:02 -04:00
|
|
|
|
2013-05-23 15:31:15 -05:00
|
|
|
# Redirect docs.openstack.org index.html subpage pointers to main page
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ dir_to_page('/install', '/' + RELEASED_SERIES + '/install/') }}
|
|
|
|
{{ dir_to_page('/basic-install', '/' + RELEASED_SERIES + '/install/') }}
|
|
|
|
{{ dir_to_page('/run', '/') }}
|
|
|
|
redirect 301 /developer/index.html /{{ RELEASED_SERIES }}/projects.html
|
|
|
|
{{ dir_to_page('/cli', '/') }}
|
2019-07-22 19:11:18 +02:00
|
|
|
redirect 301 /api/api-specs.html https://docs.openstack.org/api-quick-start/index.html
|
2013-09-30 20:15:31 +02:00
|
|
|
|
2017-08-09 16:57:38 +02:00
|
|
|
# Redirect old Admin Guides to new landing page
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ path_to_released_series('/admin-guide', '/admin/') }}
|
|
|
|
{{ path_to_released_series('/user-guide-admin', '/admin/') }}
|
2017-07-11 14:48:25 -04:00
|
|
|
|
2014-03-05 23:38:14 -05:00
|
|
|
# A doc generation bug resulted in Google indexing links containing "//", which cause
|
|
|
|
# problems with linked content (images/css/etc). This rule generates a 301 redirect
|
|
|
|
# for these links.
|
|
|
|
#
|
|
|
|
# details: https://bugs.launchpad.net/openstack-manuals/+bug/1288513
|
|
|
|
redirectmatch 301 (.*)//(.*) $1/$2
|
|
|
|
|
2016-01-05 18:50:25 +01:00
|
|
|
# Redirect networking-guide since it is now versioned
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ dir_to_page('/networking-guide', '/ocata/networking-guide/') }}
|
2016-01-05 18:50:25 +01:00
|
|
|
|
2016-01-19 14:36:16 -05:00
|
|
|
# Redirect old releases content to new location
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ deep_links('/releases', 'http://releases.openstack.org/$1') }}
|
2016-01-19 14:36:16 -05:00
|
|
|
|
2017-08-22 18:53:45 +02:00
|
|
|
# redirect all kuryr sub-repositories appropriately
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ deep_links('/developer/kuryr-(kubernetes|libnetwork|tempest-plugin)', '/kuryr-$1/latest/$2') }}
|
2017-08-22 18:53:45 +02:00
|
|
|
|
|
|
|
# redirect all kolla sub-repositories appropriately
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ deep_links('/developer/kolla-kubernetes', '/kolla-kubernetes/latest/$1') }}
|
2017-08-22 18:53:45 +02:00
|
|
|
|
2017-08-22 15:02:59 +01:00
|
|
|
# Redirect all openstack-ansible repositories appropriately
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ deep_links('/developer/(ansible-hardening|openstack-ansible-[^/]+)', '/$1/latest/$2') }}
|
2017-08-22 15:02:59 +01:00
|
|
|
|
2017-09-07 16:41:48 +02:00
|
|
|
# Redirect some tripleo repositories appropriately
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ deep_links('/developer/(tripleo-common|tripleo-quickstart|tripleo-validations)', '/$1/latest/$2') }}
|
2017-09-07 16:41:48 +02:00
|
|
|
|
|
|
|
# Redirect sahara repositories appropriately
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ deep_links('/developer/sahara-tests', '/sahara-tests/latest/$1') }}
|
2017-09-07 16:41:48 +02:00
|
|
|
|
2017-07-10 15:01:09 -04:00
|
|
|
# Redirect removed user guide
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ path_to_released_series('/user-guide', '/user/') }}
|
2017-07-10 15:01:09 -04:00
|
|
|
|
2017-07-14 14:29:34 +01:00
|
|
|
# Redirect removed ops guide
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ path_to_released_series('/ops-guide', '/admin/') }}
|
|
|
|
{{ path_to_released_series('/ops', '/admin/') }}
|
|
|
|
{{ path_to_released_series('/openstack-ops', '/admin/') }}
|
|
|
|
{{ path_to_released_series('/trunk/openstack-ops', '/admin/') }}
|
2017-08-02 22:05:11 +02:00
|
|
|
|
|
|
|
# Redirect api list
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ deep_links('/api', '/' + RELEASED_SERIES + '/api/') }}
|
2017-08-02 22:05:11 +02:00
|
|
|
|
2019-05-03 16:52:53 +02:00
|
|
|
# Redirect missing project page for openstack-charms
|
|
|
|
{{ path_to_page('/openstack-charms', '/charm-guide/') }}
|
|
|
|
|
2017-08-02 22:05:11 +02:00
|
|
|
# Redirect old security index
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ path_to_page('/sec', '/security-guide/') }}
|
|
|
|
{{ path_to_page('/security-guide/content', '/security-guide/') }}
|
2017-08-02 22:05:11 +02:00
|
|
|
|
2017-08-09 16:57:38 +02:00
|
|
|
# Redirect to series indexes
|
2018-09-15 21:25:56 +02:00
|
|
|
{{ path_to_page('/latest/configuration', '/' + SERIES_IN_DEVELOPMENT + '/configuration/') }}
|
2018-02-16 13:35:07 +00:00
|
|
|
{{ path_to_page('/latest/install', '/' + SERIES_IN_DEVELOPMENT + '/install/') }}
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ path_to_released_series('/user', '/user/') }}
|
|
|
|
{{ path_to_page('/latest/user', '/' + SERIES_IN_DEVELOPMENT + '/user/') }}
|
|
|
|
{{ path_to_released_series('/admin', '/admin/') }}
|
|
|
|
{{ path_to_page('/latest/admin', '/' + SERIES_IN_DEVELOPMENT + '/admin/') }}
|
|
|
|
{{ dir_to_page('/latest', '/' + SERIES_IN_DEVELOPMENT + '/') }}
|
2017-08-09 16:57:38 +02:00
|
|
|
|
|
|
|
# Redirect some pages users search for
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ path_to_page('/arch-design/content', '/arch-design/') }}
|
|
|
|
{{ path_to_page('/image-guide/content', '/image-guide/') }}
|
|
|
|
{{ path_to_released_series('/admin-guide-cloud', '/admin/') }}
|
|
|
|
{{ path_to_page('/trunk/openstack-compute', '/nova/latest/admin/') }}
|
2017-09-13 13:56:23 -06:00
|
|
|
redirect 301 /glossary/content/glossary.html /doc-contrib-guide/common/glossary.html
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ dir_to_page('/icehouse/training-guides', '/upstream-training/') }}
|
2017-07-14 14:29:34 +01:00
|
|
|
|
2017-09-13 13:56:23 -06:00
|
|
|
# Redirect contributor-guide URL to doc-contrib-guide
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ deep_links('/contributor-guide', '/doc-contrib-guide/$1') }}
|
2017-09-13 13:56:23 -06:00
|
|
|
|
2017-02-24 11:46:02 +09:00
|
|
|
# Redirect changed directory name in the Contributor Guide
|
2017-09-13 13:56:23 -06:00
|
|
|
redirect 301 /doc-contrib-guide/ui-text-guidelines.html /doc-contrib-guide/ux-ui-guidelines/ui-text-guidelines.html
|
|
|
|
redirect 301 /doc-contrib-guide/ui-text-guidelines /doc-contrib-guide/ux-ui-guidelines
|
2017-02-24 11:46:02 +09:00
|
|
|
|
2017-10-30 13:40:31 +00:00
|
|
|
# Redirect deploy guides to their branch index.
|
2018-08-30 09:13:34 -04:00
|
|
|
{# newton is a special case because it exists but is not maintained #}
|
|
|
|
{{ dir_to_page('/project-deploy-guide/(newton)', '/$1/deploy/') }}
|
|
|
|
{% for series in MAINTAINED_SERIES %}
|
|
|
|
{{ dir_to_page('/project-deploy-guide/(' + series + ')', '/$1/deploy/') }}
|
|
|
|
{% endfor %}
|
2017-02-22 14:53:28 -05:00
|
|
|
# Redirect any deploy guide project directory back to the current stable index
|
2017-10-26 19:08:10 +02:00
|
|
|
{{ path_to_released_series('/project-deploy-guide/?$', '/deploy/') }}
|
2017-04-03 07:50:36 -05:00
|
|
|
|
2017-07-19 15:05:44 -04:00
|
|
|
# Redirect old install guide list pages to their new home
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ path_to_page('/(havana|icehouse|juno|kilo|mitaka)/install-guide', '/$1/') }}
|
|
|
|
{{ dir_to_page('/project-install-guide/newton', '/newton/install/') }}
|
|
|
|
{{ deep_links('/project-install-guide/ocata', '/ocata/install/$1') }}
|
2017-07-19 15:05:44 -04:00
|
|
|
|
2017-09-07 16:41:48 +02:00
|
|
|
# Redirecting infra docs links to new location
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ deep_links('/infra/shade', '/shade/latest/$1') }}
|
2017-06-19 17:34:54 -04:00
|
|
|
|
2017-07-31 17:21:01 -04:00
|
|
|
# Redirecting old project developer docs to the new layout. If a
|
|
|
|
# project has an in-tree .htaccess file, assume it can handle the full
|
|
|
|
# path in the redirect. Otherwise, redirect everything to the new
|
|
|
|
# latest index.html.
|
|
|
|
{% for project in projects|sort(attribute='name') -%}
|
2017-09-07 14:36:31 -04:00
|
|
|
{# use separate rules for project.name$ and project.name/(.*)$ because
|
|
|
|
some project names are prefixes of other project names (glance and glance_store) #}
|
2017-07-31 17:21:01 -04:00
|
|
|
{%- if project.has_in_tree_htaccess %}
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ deep_links('/developer/' + project.name, '/' + project.name + '/latest/$1') }}
|
2017-07-31 17:21:01 -04:00
|
|
|
{%- else %}
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ path_to_page('/developer/' + project.name, '/' + project.name + '/latest/') }}
|
2017-07-31 17:21:01 -04:00
|
|
|
{%- endif %}
|
|
|
|
{%- endfor %}
|
2017-06-21 16:08:26 -04:00
|
|
|
|
2017-07-10 13:09:50 -04:00
|
|
|
# Redirect old cli-reference to the OSC latest docs
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ path_to_page('/cli-reference', '/python-openstackclient/latest/') }}
|
2017-07-10 13:09:50 -04:00
|
|
|
|
2017-06-21 16:08:26 -04:00
|
|
|
# Redirects from service-type to code-name
|
|
|
|
{% for project in projects -%}
|
2017-07-14 12:28:45 -04:00
|
|
|
{%- if project.type == 'service' and project.service_type and (project.service_type|lower != project.name) %}
|
2017-09-07 14:36:31 -04:00
|
|
|
{# use separate rules for project.name$ and project.name/(.*)$ because
|
|
|
|
some project names are prefixes of other project names (glance and glance_store) #}
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ path_to_page('/' + project.service_type|lower, '/' + project.name + '/latest/', 302) }}
|
2017-06-21 16:08:26 -04:00
|
|
|
{%- endif %}
|
|
|
|
{%- endfor %}
|
|
|
|
# End service-type redirects
|
2017-06-27 10:45:06 -04:00
|
|
|
|
2019-10-17 19:19:21 +02:00
|
|
|
# Redirect project-deploy-guide/code-name to project-deploy-guide/code-name/latest
|
|
|
|
{% for project in projects -%}
|
|
|
|
{%- if project.type == 'deployment' %}
|
2019-10-23 19:20:08 +02:00
|
|
|
{{ dir_to_page('/project-deploy-guide/' + project.name, '/project-deploy-guide/' + project.name + '/latest/') }}
|
2019-10-17 19:19:21 +02:00
|
|
|
{%- endif %}
|
|
|
|
{%- endfor %}
|
|
|
|
# End redirect project-deploy-guide
|
|
|
|
|
2017-06-27 10:45:06 -04:00
|
|
|
# Redirects from code-name without a series to latest
|
2017-07-06 13:51:04 -04:00
|
|
|
{% for repo in REGULAR_REPOS %}
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ dir_to_page('/' + repo.base, '/' + repo.base + '/latest/') }}
|
2017-06-27 10:45:06 -04:00
|
|
|
{%- endfor %}
|
2017-07-06 13:51:04 -04:00
|
|
|
# End latest code-name redirects
|
|
|
|
|
|
|
|
# Redirects from infra code-name without a series to location
|
|
|
|
{% for repo in INFRA_REPOS %}
|
2017-09-29 16:06:38 -04:00
|
|
|
{{ dir_to_page('/' + repo.base, '/infra/' + repo.base + '/') }}
|
2017-07-06 13:51:04 -04:00
|
|
|
{%- endfor %}
|
|
|
|
# End infra code-name redirects
|
2018-01-24 08:16:59 +01:00
|
|
|
|
2020-06-16 08:21:00 +02:00
|
|
|
# Redirects retired repos from code-name without a series to latest
|
|
|
|
{% for repo in RETIRED_REPOS %}
|
|
|
|
{{ dir_to_page('/' + repo.base, '/' + repo.base + '/latest/') }}
|
|
|
|
{%- endfor %}
|
|
|
|
# End latest code-name redirects
|
|
|
|
|
|
|
|
# Redirects retired repos to https://opendev.org/openstack/REPO/src/branch/master/README.rst
|
|
|
|
{% for repo in RETIRED_REPOS %}
|
|
|
|
{{ path_to_page('/' + repo.base + '/latest', 'https://opendev.org/' + repo.name + '/src/branch/master/README.rst' ) }}
|
|
|
|
{%- endfor %}
|
|
|
|
# End retired repos redirects
|
|
|
|
|
2018-01-24 08:16:59 +01:00
|
|
|
# Redirect https://docs.openstack.org/infra/zuul/feature/zuulv3/ to
|
2018-07-12 10:12:50 -07:00
|
|
|
# https://zuul-ci.org/docs/zuul
|
|
|
|
redirectmatch 301 /infra/zuul/feature/zuulv3(.*)$ https://zuul-ci.org/docs/zuul$1
|
2018-01-24 08:16:59 +01:00
|
|
|
# End redirect zuul/feature/zuulv3
|
2018-02-01 12:46:42 +01:00
|
|
|
|
2018-07-12 10:12:50 -07:00
|
|
|
# Redirect zuul to zuul-ci.org
|
|
|
|
{{ deep_links('/infra/zuul', 'https://zuul-ci.org/docs/zuul/$1') }}
|
|
|
|
# End redirect zuul to zuul-ci.org
|
|
|
|
|
2018-02-01 12:46:42 +01:00
|
|
|
# Redirect https://docs.openstack.org/infra/nodepool/feature/zuulv3/ to
|
2018-07-12 10:12:50 -07:00
|
|
|
# https://zuul-ci.org/docs/nodepool
|
|
|
|
redirectmatch 301 /infra/nodepool/feature/zuulv3(.*)$ https://zuul-ci.org/docs/nodepool$1
|
2018-02-01 12:46:42 +01:00
|
|
|
# End redirect nodepool/feature/zuulv3
|
2018-03-23 08:55:49 -05:00
|
|
|
|
2018-07-12 10:12:50 -07:00
|
|
|
# Redirect nodepool to zuul-ci.org
|
|
|
|
{{ deep_links('/infra/nodepool', 'https://zuul-ci.org/docs/nodepool/$1') }}
|
|
|
|
# End redirect zuul to zuul-ci.org
|
|
|
|
|
2018-08-22 13:52:43 +02:00
|
|
|
# Redirect zuul-base-jobs to zuul-ci.org
|
|
|
|
{{ deep_links('/infra/zuul-base-jobs', 'https://zuul-ci.org/docs/zuul-base-jobs/$1') }}
|
|
|
|
# End redirect zuul-base-jobs to zuul-ci.org
|
|
|
|
|
|
|
|
# Redirect zuul-jobs to zuul-ci.org
|
|
|
|
{{ deep_links('/infra/zuul-jobs', 'https://zuul-ci.org/docs/zuul-jobs/$1') }}
|
|
|
|
# End redirect zuul-jobs to zuul-ci.org
|
|
|
|
|
|
|
|
# Redirect zuul-sphinx to zuul-ci.org
|
|
|
|
{{ deep_links('/infra/zuul-sphinx', 'https://zuul-ci.org/docs/zuul-sphinx/$1') }}
|
|
|
|
# End redirect zuul-sphinx to zuul-ci.org
|
|
|
|
|
2018-03-23 08:55:49 -05:00
|
|
|
# Redirect from python-openstacksdk to openstacksdk
|
|
|
|
{{ rename_project('python-openstacksdk', 'openstacksdk') }}
|
|
|
|
# End redirect for openstacksdk
|
2018-05-17 09:59:05 +02:00
|
|
|
|
|
|
|
# Redirect from monasca to monasca-api
|
2018-05-18 09:58:54 +02:00
|
|
|
{{ rename_project('monasca', 'monasca-api') }}
|
2018-05-17 09:59:05 +02:00
|
|
|
# End redirect for monasca-api
|
2018-05-30 16:01:51 +02:00
|
|
|
|
|
|
|
# Redirect outdated bare metal installation guide
|
|
|
|
{{ deep_links('/project-install-guide/baremetal/draft', '/ironic/latest/install/$1') }}
|
|
|
|
# End redirect outdated bare metal installation guide
|
2020-03-19 17:31:48 +01:00
|
|
|
|
|
|
|
# Redirect https://docs.openstack.org/infra/manual to
|
2020-06-15 23:23:52 +00:00
|
|
|
# https://docs.opendev.org/opendev/infra-manual
|
2020-03-19 17:31:48 +01:00
|
|
|
{{ deep_links('/infra/manual', 'https://docs.opendev.org/opendev/infra-manual/latest/$1') }}
|
|
|
|
# End redirect infra-manual
|
2020-06-15 23:23:52 +00:00
|
|
|
|
|
|
|
# Redirect https://docs.openstack.org/infra/system-config to
|
|
|
|
# https://docs.opendev.org/opendev/system-config
|
|
|
|
{{ deep_links('/infra/system-config', 'https://docs.opendev.org/opendev/system-config/latest/$1') }}
|
|
|
|
# End redirect system-config
|