Skip to content

Commit 1f3103e

Browse files
authored
404 redirects updates (boostorg#1860)
1 parent 0257bc3 commit 1f3103e

File tree

5 files changed

+51
-28
lines changed

5 files changed

+51
-28
lines changed

kube/boost/templates/configmap-nginx.yaml

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -136,39 +136,58 @@ data:
136136
location = /build/ { return 301 /tools/build/; }
137137
location = /more/lib_guide.htm { return 301 /doc/contributor-guide/index.html; }
138138
139+
# Generalized rules for simple libs patterns,
140+
# TODO: needs matching development if combining is to be worked back into redirect generation branch or
141+
# adding to the exclusion list if kept here as an unreplaced block
142+
location ~ ^/doc/libs/(\\d+)_(\\d+)_(\\d+)/libs/([^/]+)/(example|src|test)$ { return 301 https://github.com/boostorg/$4/tree/boost-$1.$2.$3/$5; }
143+
location ~ ^/doc/libs/([^/]+)/libs/([^/]+)/(example|src|test)$ { return 301 https://github.com/boostorg/$2/tree/{{.Values.boostLatestRelease}}/$3; }
144+
139145
# the following block of locations are from the nginx redirect configuration script and
140146
# should be replaced with the newly generated block as a whole
147+
# TODO: the version/unversioned pairing needs matching development if worked back into redirect generation branch
141148
142149
location = /doc/libs/1.33.0/libs/spirit/example { return 301 https://github.com/boostorg/spirit/tree/boost-1.33.0/example; }
143150
location = /doc/libs/1.69.0/libs/beast/example/cppcon2018 { return 301 https://github.com/boostorg/beast/tree/boost-1.69.0/example/cppcon2018; }
144-
location ~ ^/doc/libs/([^/]+)/boost/archive/detail$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1/include/boost/archive/detail; }
145-
location ~ ^/doc/libs/([^/]+)/boost/archive/impl$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1/include/boost/archive/impl; }
146-
location ~ ^/doc/libs/([^/]+)/boost/archive/iterators$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1/include/boost/archive/iterators; }
147-
location ~ ^/doc/libs/([^/]+)/boost/compatibility/cpp_c_headers$ { return 301 https://github.com/boostorg/compatibility/tree/boost-$1/include/boost/compatibility/cpp_c_headers; }
148-
location ~ ^/doc/libs/([^/]+)/libs/beast/example$ { return 301 https://github.com/boostorg/beast/tree/boost-$1/example; }
149-
location ~ ^/doc/libs/([^/]+)/libs/beast/example/websocket/server/chat-multi$ { return 301 https://github.com/boostorg/beast/tree/boost-$1/example/websocket/server/chat-multi; }
150-
location ~ ^/doc/libs/([^/]+)/libs/bimap/example$ { return 301 https://github.com/boostorg/bimap/tree/boost-$1/example; }
151-
location ~ ^/doc/libs/([^/]+)/libs/filesystem/doc/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1/doc/src; }
152-
location ~ ^/doc/libs/([^/]+)/libs/filesystem/example$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1/example; }
153-
location ~ ^/doc/libs/([^/]+)/libs/filesystem/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1/src; }
154-
location ~ ^/doc/libs/([^/]+)/libs/filesystem/v2/example$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1/v2/example; }
155-
location ~ ^/doc/libs/([^/]+)/libs/filesystem/v2/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1/v2/src; }
156-
location ~ ^/doc/libs/([^/]+)/libs/filesystem/v3/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1/v3/src; }
157-
location ~ ^/doc/libs/([^/]+)/libs/iostreams/build$ { return 301 https://github.com/boostorg/iostreams/tree/boost-$1/build; }
158-
location ~ ^/doc/libs/([^/]+)/libs/python/build/VisualStudio$ { return 301 https://github.com/boostorg/python/tree/boost-$1/build/VisualStudio; }
159-
location ~ ^/doc/libs/([^/]+)/libs/python/example$ { return 301 https://github.com/boostorg/python/tree/boost-$1/example; }
160-
location ~ ^/doc/libs/([^/]+)/libs/python/test$ { return 301 https://github.com/boostorg/python/tree/boost-$1/test; }
161-
location ~ ^/doc/libs/([^/]+)/libs/regex/test/captures$ { return 301 https://github.com/boostorg/regex/tree/boost-$1/test/captures; }
162-
location ~ ^/doc/libs/([^/]+)/libs/regex/test/concepts$ { return 301 https://github.com/boostorg/regex/tree/boost-$1/test/concepts; }
163-
location ~ ^/doc/libs/([^/]+)/libs/regex/test/pathology$ { return 301 https://github.com/boostorg/regex/tree/boost-$1/test/pathology; }
164-
location ~ ^/doc/libs/([^/]+)/libs/regex/test/regress$ { return 301 https://github.com/boostorg/regex/tree/boost-$1/test/regress; }
165-
location ~ ^/doc/libs/([^/]+)/libs/serialization/src$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1/src; }
166-
location ~ ^/doc/libs/([^/]+)/libs/sort/example$ { return 301 https://github.com/boostorg/sort/tree/boost-$1/example; }
167-
location ~ ^/doc/libs/([^/]+)/libs/spirit/example/qi/mini_xml_samples$ { return 301 https://github.com/boostorg/spirit/tree/boost-$1/example/qi/mini_xml_samples; }
168-
location ~ ^/doc/libs/([^/]+)/libs/spirit/example/support/utree$ { return 301 https://github.com/boostorg/spirit/tree/boost-$1/example/support/utree; }
169-
location ~ ^/doc/libs/([^/]+)/libs/spirit/example/x3/rexpr/rexpr_full$ { return 301 https://github.com/boostorg/spirit/tree/boost-$1/example/x3/rexpr/rexpr_full; }
170-
location ~ ^/doc/libs/([^/]+)/tools/boostbook$ { return 301 https://github.com/boostorg/boostbook/tree/boost-$1; }
171-
location ~ ^/doc/libs/([^/]+)/tools/build/v2/example/customization$ { return 301 https://github.com/boostorg/build/tree/boost-$1/v2/example/customization; }
151+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/boost/archive/detail$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1.$2.$3/include/boost/archive/detail; }
152+
location ~ ^/doc/libs/([^/]+)/boost/archive/detail$ { return 301 https://github.com/boostorg/serialization/tree/{{.Values.boostLatestRelease}}/include/boost/archive/detail; }
153+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/boost/archive/impl$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1.$2.$3/include/boost/archive/impl; }
154+
location ~ ^/doc/libs/([^/]+)/boost/archive/impl$ { return 301 https://github.com/boostorg/serialization/tree/{{.Values.boostLatestRelease}}/include/boost/archive/impl; }
155+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/boost/archive/iterators$ { return 301 https://github.com/boostorg/serialization/tree/boost-$1.$2.$3/include/boost/archive/iterators; }
156+
location ~ ^/doc/libs/([^/]+)/boost/archive/iterators$ { return 301 https://github.com/boostorg/serialization/tree/{{.Values.boostLatestRelease}}/include/boost/archive/iterators; }
157+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/boost/compatibility/cpp_c_headers$ { return 301 https://github.com/boostorg/compatibility/tree/boost-$1.$2.$3/include/boost/compatibility/cpp_c_headers; }
158+
location ~ ^/doc/libs/([^/]+)/boost/compatibility/cpp_c_headers$ { return 301 https://github.com/boostorg/compatibility/tree/{{.Values.boostLatestRelease}}/include/boost/compatibility/cpp_c_headers; }
159+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/beast/example/websocket/server/chat-multi$ { return 301 https://github.com/boostorg/beast/tree/boost-$1.$2.$3/example/websocket/server/chat-multi; }
160+
location ~ ^/doc/libs/([^/]+)/libs/beast/example/websocket/server/chat-multi$ { return 301 https://github.com/boostorg/beast/tree/{{.Values.boostLatestRelease}}/example/websocket/server/chat-multi; }
161+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/filesystem/doc/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1.$2.$3/doc/src; }
162+
location ~ ^/doc/libs/([^/]+)/libs/filesystem/doc/src$ { return 301 https://github.com/boostorg/filesystem/tree/{{.Values.boostLatestRelease}}/doc/src; }
163+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/filesystem/v2/example$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1.$2.$3/v2/example; }
164+
location ~ ^/doc/libs/([^/]+)/libs/filesystem/v2/example$ { return 301 https://github.com/boostorg/filesystem/tree/{{.Values.boostLatestRelease}}/v2/example; }
165+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/filesystem/v2/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1.$2.$3/v2/src; }
166+
location ~ ^/doc/libs/([^/]+)/libs/filesystem/v2/src$ { return 301 https://github.com/boostorg/filesystem/tree/{{.Values.boostLatestRelease}}/v2/src; }
167+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/filesystem/v3/src$ { return 301 https://github.com/boostorg/filesystem/tree/boost-$1.$2.$3/v3/src; }
168+
location ~ ^/doc/libs/([^/]+)/libs/filesystem/v3/src$ { return 301 https://github.com/boostorg/filesystem/tree/{{.Values.boostLatestRelease}}/v3/src; }
169+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/iostreams/build$ { return 301 https://github.com/boostorg/iostreams/tree/boost-$1.$2.$3/build; }
170+
location ~ ^/doc/libs/([^/]+)/libs/iostreams/build$ { return 301 https://github.com/boostorg/iostreams/tree/{{.Values.boostLatestRelease}}/build; }
171+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/python/build/VisualStudio$ { return 301 https://github.com/boostorg/python/tree/boost-$1.$2.$3/build/VisualStudio; }
172+
location ~ ^/doc/libs/([^/]+)/libs/python/build/VisualStudio$ { return 301 https://github.com/boostorg/python/tree/{{.Values.boostLatestRelease}}/build/VisualStudio; }
173+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/regex/test/captures$ { return 301 https://github.com/boostorg/regex/tree/boost-$1.$2.$3/test/captures; }
174+
location ~ ^/doc/libs/([^/]+)/libs/regex/test/captures$ { return 301 https://github.com/boostorg/regex/tree/{{.Values.boostLatestRelease}}/test/captures; }
175+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/regex/test/concepts$ { return 301 https://github.com/boostorg/regex/tree/boost-$1.$2.$3/test/concepts; }
176+
location ~ ^/doc/libs/([^/]+)/libs/regex/test/concepts$ { return 301 https://github.com/boostorg/regex/tree/{{.Values.boostLatestRelease}}/test/concepts; }
177+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/regex/test/pathology$ { return 301 https://github.com/boostorg/regex/tree/boost-$1.$2.$3/test/pathology; }
178+
location ~ ^/doc/libs/([^/]+)/libs/regex/test/pathology$ { return 301 https://github.com/boostorg/regex/tree/{{.Values.boostLatestRelease}}/test/pathology; }
179+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/regex/test/regress$ { return 301 https://github.com/boostorg/regex/tree/boost-$1.$2.$3/test/regress; }
180+
location ~ ^/doc/libs/([^/]+)/libs/regex/test/regress$ { return 301 https://github.com/boostorg/regex/tree/{{.Values.boostLatestRelease}}/test/regress; }
181+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/spirit/example/qi/mini_xml_samples$ { return 301 https://github.com/boostorg/spirit/tree/boost-$1.$2.$3/example/qi/mini_xml_samples; }
182+
location ~ ^/doc/libs/([^/]+)/libs/spirit/example/qi/mini_xml_samples$ { return 301 https://github.com/boostorg/spirit/tree/{{.Values.boostLatestRelease}}/example/qi/mini_xml_samples; }
183+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/spirit/example/support/utree$ { return 301 https://github.com/boostorg/spirit/tree/boost-$1.$2.$3/example/support/utree; }
184+
location ~ ^/doc/libs/([^/]+)/libs/spirit/example/support/utree$ { return 301 https://github.com/boostorg/spirit/tree/{{.Values.boostLatestRelease}}/example/support/utree; }
185+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/libs/spirit/example/x3/rexpr/rexpr_full$ { return 301 https://github.com/boostorg/spirit/tree/boost-$1.$2.$3/example/x3/rexpr/rexpr_full; }
186+
location ~ ^/doc/libs/([^/]+)/libs/spirit/example/x3/rexpr/rexpr_full$ { return 301 https://github.com/boostorg/spirit/tree/{{.Values.boostLatestRelease}}/example/x3/rexpr/rexpr_full; }
187+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/tools/boostbook$ { return 301 https://github.com/boostorg/boostbook/tree/boost-$1.$2.$3; }
188+
location ~ ^/doc/libs/([^/]+)/tools/boostbook$ { return 301 https://github.com/boostorg/boostbook/tree/{{.Values.boostLatestRelease}}; }
189+
location ~ ^/doc/libs/(\d+)_(\d+)_(\d+)/tools/build/v2/example/customization$ { return 301 https://github.com/boostorg/build/tree/boost-$1.$2.$3/v2/example/customization; }
190+
location ~ ^/doc/libs/([^/]+)/tools/build/v2/example/customization$ { return 301 https://github.com/boostorg/build/tree/{{.Values.boostLatestRelease}}/v2/example/customization; }
172191
173192
# block end
174193

kube/boost/values-cppal-dev-gke.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ nginxImageTag: "1.21-alpine"
77

88
deploymentEnvironment: &env dev
99
clientMaxBodySize: 250m
10+
boostLatestRelease: "boost-1.88.0"
1011

1112
replicaCount: "2"
1213

kube/boost/values-production-gke.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ nginxImageTag: "1.21-alpine"
77

88
deploymentEnvironment: &env production
99
clientMaxBodySize: 250m
10+
boostLatestRelease: "boost-1.88.0"
1011

1112
replicaCount: "2"
1213

kube/boost/values-stage-gke.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ nginxImageTag: "1.21-alpine"
77

88
deploymentEnvironment: &env stage
99
clientMaxBodySize: 250m
10+
boostLatestRelease: "boost-1.88.0"
1011

1112
replicaCount: "2"
1213

kube/boost/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ nginxImageTag: "1.21-alpine"
77

88
deploymentEnvironment: &env dev
99
clientMaxBodySize: 250m
10+
boostLatestRelease: "boost-1.88.0"
1011

1112
replicaCount: "2"
1213

0 commit comments

Comments
 (0)