File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Used with a docker container for localised testing.
2
+
3
+ events {
4
+ worker_connections 1024 ;
5
+ }
6
+
7
+ http {
8
+ server {
9
+ listen 80 ;
10
+ server_name localhost;
11
+
12
+ # Your optimized redirect rules
13
+ location ~ * ^/mobile/( [^/]+) /( [^/]+) /Enumerations\.html$ {
14
+ return 301 /mobile/$1 /$2 /Enums.html;
15
+ }
16
+
17
+ location ~ * ^/mobile/( [^/]+) /( [^/]+) /Structures\.html$ {
18
+ return 301 /mobile/$1 /$2 /Structs.html;
19
+ }
20
+
21
+ # Add a test page
22
+ location / {
23
+ default_type text/plain;
24
+ return 200 "Test page\n " ;
25
+ }
26
+ }
27
+ }
Original file line number Diff line number Diff line change @@ -242,3 +242,14 @@ location ^~ /admin/admin/ {
242
242
# final redirect to archives
243
243
rewrite ^/admin/(.*)$ $scheme://docs-archive.couchbase.com/docs-3x/$1 permanent;
244
244
}
245
+
246
+ # Send some of the erroneous API pages to their correct pages
247
+
248
+ location ~* ^/mobile/([^/]+)/([^/]+)/Enumerations\.html$ {
249
+ return 301 /mobile/$1/$2/Enums.html;
250
+ }
251
+
252
+ location ~* ^/mobile/([^/]+)/([^/]+)/Structures\.html$ {
253
+ return 301 /mobile/$1/$2/Structs.html;
254
+ }
255
+
You can’t perform that action at this time.
0 commit comments