openstack-manuals/www/.htaccess
Doug Hellmann 37c83af5a5 add landing pages for historical versions
Add landing pages with references to all of the historical versions
for completeness. For the versions where we do have guides still
published, include links.

Change-Id: I62211adab1628f10e88f4892dd85a50170da1d96
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-25 16:48:58 -04:00

89 lines
3.8 KiB
ApacheConf

{# NOTE(dhellmann): This file is not in a series directory,
so we need to set the series name ourselves. #}
{% set series = 'latest' %}
{% set projects = PROJECT_DATA[series] %}
# Redirect old top-level HTML pages to the version under most recent
# full release.
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
# Redirect docs.openstack.org index.html subpage pointers to main page
redirect 301 /install/ /{{RELEASED_SERIES}}/install/
redirect 301 /basic-install/ /{{RELEASED_SERIES}}/install/
redirect 301 /run/ /
redirect 301 /developer/index.html /{{RELEASED_SERIES}}/projects.html
redirect 301 /cli/ /
redirect 301 /api/api-specs.html http://developer.openstack.org/api-guide/quick-start/index.html
# Redirect O'Reilly Operations Guide PDF to trunk version
redirect 301 /trunk/openstack-ops/oreilly-openstack-ops-guide.pdf /openstack-ops/openstack-ops-manual.pdf
# Redirect old Admin Guide to new landing page
redirectmatch 301 /admin-guide/.*$ /{{RELEASED_SERIES}}/admin/index.html
# 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
# Redirect networking-guide since it is now versioned
redirect 301 /networking-guide/ /ocata/networking-guide/
# Redirect old releases content to new location
redirectmatch 301 "^/releases.*$" http://releases.openstack.org$1
# Redirect removed user guide
redirectmatch 301 /user-guide/.*$ /{{RELEASED_SERIES}}/user/
# Redirect removed ops guide
redirectmatch 301 /ops-guide/.*$ /{{RELEASED_SERIES}}/admin/
# Redirect changed directory name in the Contributor Guide
redirect 301 /contributor-guide/ui-text-guidelines.html /contributor-guide/ux-ui-guidelines/ui-text-guidelines.html
redirect 301 /contributor-guide/ui-text-guidelines /contributor-guide/ux-ui-guidelines
# Redirect any deploy guide project directory back to the current stable index
redirectmatch 301 "^/project-deploy-guide/$" /{{RELEASED_SERIES}}/deploy/
redirectmatch 301 "^/project-deploy-guide/openstack-ansible/$" /project-deploy-guide/openstack-ansible/{{RELEASED_SERIES}}/
redirectmatch 301 "^/project-deploy-guide/newton/" /newton/deploy/
redirectmatch 301 "^/project-deploy-guide/ocata/" /ocata/deploy/
# Redirect old install guide list pages to their new home
redirectmatch 301 "^/project-install-guide/newton/" /newton/install/
redirectmatch 301 "^/project-install-guide/ocata/(.*)$" /ocata/install/$1
# Redirecting infra docs links to new developer location
redirectmatch 301 "^/infra/shade(.*)$" /developer/shade$1
# Redirecting old project developer docs to the new project home pages
# while leaving the index / project list page as it is.
redirectmatch 301 "^/developer/([^/]+)/.*$" /$1/latest/
# Redirect old cli-reference to the OSC latest docs
redirectmatch 301 "^/cli-reference/.*$" /python-openstackclient/latest/
# Redirects from service-type to code-name
{% for project in projects -%}
{%- if project.type == 'service' and project.service_type and (project.service_type|lower != project.name) %}
redirectmatch 302 "^/{{project.service_type|lower}}/.*$" /{{project.name}}/latest/
{%- endif %}
{%- endfor %}
# End service-type redirects
# Redirects from code-name without a series to latest
{% for repo in REGULAR_REPOS %}
redirectmatch 301 "^/{{repo.base}}/$" /{{repo.base}}/latest/
{%- endfor %}
# End latest code-name redirects
# Redirects from infra code-name without a series to location
{% for repo in INFRA_REPOS %}
redirectmatch 301 "^/{{repo.base}}/$" /infra/{{repo.base}}/
{%- endfor %}
# End infra code-name redirects