diff options
| author | Eric Fried <openstack@fried.cc> | 2019-11-04 17:55:40 -0600 |
|---|---|---|
| committer | Eric Fried <openstack@fried.cc> | 2019-11-05 07:09:05 -0600 |
| commit | e2d8dc0f1c33613c56da37758d73d63b550642c0 (patch) | |
| tree | cde57aaeb54ec71a20c04cf5949337eb58a63730 | |
| parent | 6f07828bf044e5eda53037e986d9ae642ee499af (diff) | |
| download | python-openstackclient-e2d8dc0f1c33613c56da37758d73d63b550642c0.tar.gz | |
Deflate .htaccess
Use some regexes to reduce the number of lines in .htaccess and
hopefully make it slightly clearer which groupings of files redirect to
which new locations.
Also collapse one redundant double-redirect.
Change-Id: I65c4960856985d71076291f175df17f27a5ab8cc
| -rw-r--r-- | doc/source/_extra/.htaccess | 18 | ||||
| -rw-r--r-- | doc/test/redirect-tests.txt | 2 |
2 files changed, 4 insertions, 16 deletions
diff --git a/doc/source/_extra/.htaccess b/doc/source/_extra/.htaccess index fd91901e..513deddb 100644 --- a/doc/source/_extra/.htaccess +++ b/doc/source/_extra/.htaccess @@ -2,22 +2,10 @@ redirectmatch 301 ^/python-openstackclient/([^/]+)/command-objects/([^/.]+).html$ /python-openstackclient/$1/cli/command-objects/$2.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/authentication.html$ /python-openstackclient/$1/cli/authentication.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/backward-incompatible.html$ /python-openstackclient/$1/cli/backward-incompatible.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/command-list.html$ /python-openstackclient/$1/cli/command-list.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/commands.html$ /python-openstackclient/$1/cli/commands.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/decoder.html$ /python-openstackclient/$1/cli/decoder.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/interactive.html$ /python-openstackclient/$1/cli/interactive.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/plugin-commands.html$ /python-openstackclient/$1/cli/plugin-commands.html +redirectmatch 301 ^/python-openstackclient/([^/]+)/(authentication|backward-incompatible|command-list|commands|decoder|interactive).html$ /python-openstackclient/$1/cli/$2.html +redirectmatch 301 ^/python-openstackclient/([^/]+)/plugin-commands.html$ /python-openstackclient/$1/cli/plugin-commands/index.html redirectmatch 301 ^/python-openstackclient/([^/]+)/specs/([^/.]+).html$ /python-openstackclient/$1/contributor/specs/$2.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/command-beta.html$ /python-openstackclient/$1/contributor/command-beta.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/command-errors.html$ /python-openstackclient/$1/contributor/command-errors.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/command-logs.html$ /python-openstackclient/$1/contributor/command-logs.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/command-options.html$ /python-openstackclient/$1/contributor/command-options.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/command-wrappers.html$ /python-openstackclient/$1/contributor/command-wrappers.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/developing.html$ /python-openstackclient/$1/contributor/developing.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/humaninterfaceguide.html$ /python-openstackclient/$1/contributor/humaninterfaceguide.html -redirectmatch 301 ^/python-openstackclient/([^/]+)/plugins.html$ /python-openstackclient/$1/contributor/plugins.html +redirectmatch 301 ^/python-openstackclient/([^/]+)/(command-(beta|errors|logs|options|wrappers)|developing|humaninterfaceguide|plugins).html$ /python-openstackclient/$1/contributor/$2.html redirectmatch 301 ^/python-openstackclient/([^/]+)/cli/plugin-commands.html$ /python-openstackclient/$1/cli/plugin-commands/index.html diff --git a/doc/test/redirect-tests.txt b/doc/test/redirect-tests.txt index 9473d692..ef3a48de 100644 --- a/doc/test/redirect-tests.txt +++ b/doc/test/redirect-tests.txt @@ -5,7 +5,7 @@ /python-openstackclient/latest/commands.html 301 /python-openstackclient/latest/cli/commands.html /python-openstackclient/latest/decoder.html 301 /python-openstackclient/latest/cli/decoder.html /python-openstackclient/latest/interactive.html 301 /python-openstackclient/latest/cli/interactive.html -/python-openstackclient/latest/plugin-commands.html 301 /python-openstackclient/latest/cli/plugin-commands.html +/python-openstackclient/latest/plugin-commands.html 301 /python-openstackclient/latest/cli/plugin-commands/index.html /python-openstackclient/latest/specs/this-is-a-test.html 301 /python-openstackclient/latest/contributor/specs/this-is-a-test.html /python-openstackclient/latest/command-beta.html 301 /python-openstackclient/latest/contributor/command-beta.html /python-openstackclient/latest/command-errors.html 301 /python-openstackclient/latest/contributor/command-errors.html |
