From 6c8697442e193547e9bc5f7fee01729915ae61f0 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Thu, 2 Nov 2017 16:20:48 -0400 Subject: [PATCH] Do deep redirects from old docs.openstack.org URLs The docs.openstack.org site was rearranged so that the old docs at /developer/heat/ are now at /heat/latest/. The base .htaccess file in openstack-manuals redirects everything in the old hierarchy to the root of the new one unless there is a .htaccess file present (see I0af0e32d9c646d61f4c72599cdc4613299aa5ec9). Add a .htaccess file so that old links redirect to the equivalent page in the new location. Change-Id: I74de09f4e25c2eda050053d3b8646586c9f24c04 Closes-Bug: #1722820 --- doc/source/_extra/.htaccess | 3 +++ doc/source/conf.py | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 doc/source/_extra/.htaccess diff --git a/doc/source/_extra/.htaccess b/doc/source/_extra/.htaccess new file mode 100644 index 0000000000..2459e717f7 --- /dev/null +++ b/doc/source/_extra/.htaccess @@ -0,0 +1,3 @@ +# The top-level docs project will redirect URLs from the old /developer docs +# to their equivalent pages on the new docs.openstack.org only if this file +# exists. diff --git a/doc/source/conf.py b/doc/source/conf.py index 0aa4b3732c..b12725136a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -182,6 +182,10 @@ html_theme_options = {"sidebar_mode": "toc"} # so a file named "default.css" will overwrite the builtin "default.css". # html_static_path = ['_static'] +# Add any paths that contain "extra" files, such as .htaccess or +# robots.txt. +html_extra_path = ['_extra'] + # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. # html_last_updated_fmt = '%b %d, %Y'