Skip to content

Commit e2d8dc0

Browse files
author
Eric Fried
committed
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
1 parent 6f07828 commit e2d8dc0

2 files changed

Lines changed: 4 additions & 16 deletions

File tree

doc/source/_extra/.htaccess

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,10 @@
22

33
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-objects/([^/.]+).html$ /python-openstackclient/$1/cli/command-objects/$2.html
44

5-
redirectmatch 301 ^/python-openstackclient/([^/]+)/authentication.html$ /python-openstackclient/$1/cli/authentication.html
6-
redirectmatch 301 ^/python-openstackclient/([^/]+)/backward-incompatible.html$ /python-openstackclient/$1/cli/backward-incompatible.html
7-
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-list.html$ /python-openstackclient/$1/cli/command-list.html
8-
redirectmatch 301 ^/python-openstackclient/([^/]+)/commands.html$ /python-openstackclient/$1/cli/commands.html
9-
redirectmatch 301 ^/python-openstackclient/([^/]+)/decoder.html$ /python-openstackclient/$1/cli/decoder.html
10-
redirectmatch 301 ^/python-openstackclient/([^/]+)/interactive.html$ /python-openstackclient/$1/cli/interactive.html
11-
redirectmatch 301 ^/python-openstackclient/([^/]+)/plugin-commands.html$ /python-openstackclient/$1/cli/plugin-commands.html
5+
redirectmatch 301 ^/python-openstackclient/([^/]+)/(authentication|backward-incompatible|command-list|commands|decoder|interactive).html$ /python-openstackclient/$1/cli/$2.html
6+
redirectmatch 301 ^/python-openstackclient/([^/]+)/plugin-commands.html$ /python-openstackclient/$1/cli/plugin-commands/index.html
127

138
redirectmatch 301 ^/python-openstackclient/([^/]+)/specs/([^/.]+).html$ /python-openstackclient/$1/contributor/specs/$2.html
149

15-
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-beta.html$ /python-openstackclient/$1/contributor/command-beta.html
16-
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-errors.html$ /python-openstackclient/$1/contributor/command-errors.html
17-
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-logs.html$ /python-openstackclient/$1/contributor/command-logs.html
18-
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-options.html$ /python-openstackclient/$1/contributor/command-options.html
19-
redirectmatch 301 ^/python-openstackclient/([^/]+)/command-wrappers.html$ /python-openstackclient/$1/contributor/command-wrappers.html
20-
redirectmatch 301 ^/python-openstackclient/([^/]+)/developing.html$ /python-openstackclient/$1/contributor/developing.html
21-
redirectmatch 301 ^/python-openstackclient/([^/]+)/humaninterfaceguide.html$ /python-openstackclient/$1/contributor/humaninterfaceguide.html
22-
redirectmatch 301 ^/python-openstackclient/([^/]+)/plugins.html$ /python-openstackclient/$1/contributor/plugins.html
10+
redirectmatch 301 ^/python-openstackclient/([^/]+)/(command-(beta|errors|logs|options|wrappers)|developing|humaninterfaceguide|plugins).html$ /python-openstackclient/$1/contributor/$2.html
2311
redirectmatch 301 ^/python-openstackclient/([^/]+)/cli/plugin-commands.html$ /python-openstackclient/$1/cli/plugin-commands/index.html

doc/test/redirect-tests.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/python-openstackclient/latest/commands.html 301 /python-openstackclient/latest/cli/commands.html
66
/python-openstackclient/latest/decoder.html 301 /python-openstackclient/latest/cli/decoder.html
77
/python-openstackclient/latest/interactive.html 301 /python-openstackclient/latest/cli/interactive.html
8-
/python-openstackclient/latest/plugin-commands.html 301 /python-openstackclient/latest/cli/plugin-commands.html
8+
/python-openstackclient/latest/plugin-commands.html 301 /python-openstackclient/latest/cli/plugin-commands/index.html
99
/python-openstackclient/latest/specs/this-is-a-test.html 301 /python-openstackclient/latest/contributor/specs/this-is-a-test.html
1010
/python-openstackclient/latest/command-beta.html 301 /python-openstackclient/latest/contributor/command-beta.html
1111
/python-openstackclient/latest/command-errors.html 301 /python-openstackclient/latest/contributor/command-errors.html

0 commit comments

Comments
 (0)