allow redirects in .htaccess files on the static web servers

As part of allowing projects to establish redirects when they move
documentation pages around, we need to let them use .htaccess files.
We only want to allow Redirect and RedirectMatch directives,
though. This change restricts the directives on docs.o.o and adds them
on the static servers used for drafts published during a build (to
allow testing of the redirects).

For more details see:
 http://lists.openstack.org/pipermail/openstack-dev/2017-July/120240.html

Change-Id: I256d69f08499549e9e21179eb89f49cda79f7ac7
This commit is contained in:
rajat29 2017-08-03 15:39:17 +05:30
parent 9787639cc6
commit 9cb455f1cc
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,3 @@
redirectmatch 301 ^/castellan/([^/]+)/usage.html$ ^/user/index.html
redirectmatch 301 ^/castellan/([^/]+)/testing.html$ ^/contributor/testing.html
redirectmatch 301 ^/castellan/([^/]+)/installation.html$ ^/install/index.html

View File

@ -64,6 +64,10 @@ htmlhelp_basename = '%sdoc' % project
# html_last_updated_fmt = '%b %d, %Y'
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# Add any paths that contain "extra" files, such as .htaccess or
# robots.txt.
html_extra_path = ['_extra']
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).