/
global.conf
411 lines (300 loc) · 19.4 KB
/
global.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
ExpiresActive on
## Redirect things externally!
# bug 855734 - if request comes in with hostname that has a trailing ".", strip it off
# (note that Apache will put the hostname with "." stripped as the host of the
# redirect URL by default; we just need to "redirect" to the same URL)
RewriteCond %{HTTP_HOST} ^(.*)\.$
RewriteRule ^(.*)$ $1 [L,R=301]
# bug 845988 - remove double slashes in URLs
RewriteRule ^(.*)//(.*)$ $1/$2 [L,R=301]
# bug 880182
RewriteRule ^/ja-JP-mac(/.*)? /ja$1 [L,R=301]
# bug 764261, 841393
RewriteRule ^/zh-TW/$ http://mozilla.com.tw/ [L,R=301]
RewriteCond %{REQUEST_URI} !^/zh-TW/firefox/partners
RewriteRule ^/zh-TW/firefox(/.*)?$ http://mozilla.com.tw/firefox$1 [L,R=301]
RewriteRule ^/zh-TW/mobile/?$ http://mozilla.com.tw/firefox/mobile/ [L,R=301]
RewriteRule ^/zh-TW/download/?$ http://mozilla.com.tw/firefox/download/ [L,R=301]
RewriteRule ^/zh-TW/products(/.*)?$ http://mozilla.com.tw/products$1 [L,R=301]
# bug 845580
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?home/?$ /$1firefox/ [L,R=301]
# bug 755826
RewriteRule ^/zh-CN/$ http://firefox.com.cn/ [L,R=301]
#bug 857246 redirect /products/firefox/start/ to start.mozilla.org
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?products/firefox/start(/?)$ http://start.mozilla.org [L,R=301]
#bug 856081 redirect /about/drivers https://wiki.mozilla.org/Firefox/Drivers
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/drivers(\.html|/)?$ https://wiki.mozilla.org/Firefox/Drivers [L,R=301]
# bug 856075
RewriteRule ^/projects/technologies\.html$ https://developer.mozilla.org/docs/Mozilla/Using_Mozilla_code_in_other_projects [L,R=301]
# bug 874526, 877698
RewriteRule ^/projects/security/components(.*)$ http://www-archive.mozilla.org/projects/security/components$1 [L,R=301]
# bug 876889
RewriteRule ^/projects/testopia/?$ https://developer.mozilla.org/docs/Mozilla/Bugzilla/Testopia [L,R=301]
# bug 874525
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?projects/security/pki/nss.*$ https://developer.mozilla.org/docs/NSS [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?projects/security/pki/jss.*$ https://developer.mozilla.org/docs/JSS [L,R=301]
# bug 780672
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/webhero(.*)$ /firefox/ [L,R=301]
# bug 782333
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/backtoschool(/?)$ https://addons.mozilla.org/firefox/collections/mozilla/back-to-school/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/backtoschool/firstrun(/?)$ /firefox/firstrun/ [L,R=301]
# bug 824126, 837942
RewriteRule ^/ports/qtmozilla(?:/(?:index.html)?)?$ https://wiki.mozilla.org/Qt [L,R=301]
RewriteRule ^/ports/os2/?$ https://wiki.mozilla.org/Ports/os2 [L,R=301]
RewriteCond %{REQUEST_URI} !^/ports/os2/gcc/?
RewriteCond %{REQUEST_URI} !^/ports/os2/selmail/?
RewriteRule ^/ports(.*)$ http://www-archive.mozilla.org/ports$1 [L,R=301]
## Redirect things to django!
# bug 797192, 892470
RewriteRule ^/(en-US|ast|bg|cs|csb|da|de|el|eo|es-AR|es-CL|es-ES|et|eu|fr|hu|hy-AM|id|is|it|ja|ko|lv|mk|mr|nb-NO|nl|pa-IN|pl|pt-BR|pt-PT|rm|ru|sk|sl|sq|sr|sv-SE|tr|uk|zh-TW)/plugincheck(/?)$ /b/$1/plugincheck$2 [PT]
# bug 835506
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?facebookapps/(.*)?$ /b/$1facebookapps/$2 [PT]
# bug 854561
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?projects/mozilla-based(\.html|/)?$ /$1about/mozilla-based/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/mozilla-based(/?)$ /b/$1about/mozilla-based$2 [PT]
# bug 851727
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?projects/powered-by(\.html|/)?$ /$1about/powered-by/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/powered-by(/?)$ /b/$1about/powered-by$2 [PT]
# bug 837883
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/firefox\.exe$ /$1 [NC,L,R=301]
# bug 815908
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?newsletter/hacks\.mozilla\.org(/?)$ /b/$1newsletter/hacks.mozilla.org$2 [PT]
# bug 821006
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/all(\.html)?$ /$1firefox/all/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/all/$ /b/$1firefox/all/ [PT]
# bug 803345
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?apps(.*)$ /b/$1apps$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?persona(.*)$ /b/$1persona$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?b2g(.*)$ /b/$1b2g$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?collusion(.*)$ /b/$1collusion$2 [PT]
# bug 882845
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/toolkit/download-to-your-devices(.*)$ /$1firefox/ [L,R=301]
RewriteRule ^/(en-US|fr)(/?)$ /b/$1$2 [PT]
# bug 822260
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/mission.html$ /b/$1about/mission.html [PT]
# bug 889958
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about(/?)?$ /b/$1about$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/partnerships(/?)$ /b/$1about/partnerships$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/partnerships/distribution(/?)$ /b/$1about/partnerships/distribution$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?mission(/?)$ /b/$1mission$2 [PT]
# bug 843789
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/partnerships/contact-bizdev(/?)$ /b/$1about/partnerships/contact-bizdev$2 [PT]
# bug 793754
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?contribute(/?)$ /b/$1contribute$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?contribute/page(/?)$ /b/$1contribute/page$2 [PT]
# bug 807155
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?contribute/embed(/?)$ /b/$1contribute/embed$2 [PT]
# bug 787953
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?contribute/event(.*)$ /b/$1contribute/event$2 [PT]
# bug 859564
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?contribute/universityambassadors(.*)$ /b/$1contribute/universityambassadors$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?projects(/?)$ /b/$1projects$2 [PT]
RewriteRule ^/en-US/firefox/new(/?)$ /b/en-US/firefox/new$1 [PT]
RewriteRule ^/en-US/firefox/fx(/?)$ /b/en-US/firefox/fx$1 [PT]
RewriteRule ^/en-US/firefox/features(/?)$ /b/en-US/firefox/features$1 [PT]
RewriteRule ^/en-US/firefox/customize(/?)$ /b/en-US/firefox/customize$1 [PT]
RewriteRule ^/en-US/firefox/performance(/?)$ /b/en-US/firefox/performance$1 [PT]
RewriteRule ^/en-US/firefox/technology(/?)$ /b/en-US/firefox/technology$1 [PT]
RewriteRule ^/en-US/firefox/security(/?)$ /b/en-US/firefox/security$1 [PT]
RewriteRule ^/en-US/firefox/organizations(/?)$ /b/en-US/firefox/organizations$1 [PT]
RewriteRule ^/en-US/firefox/organizations/faq(/?)$ /b/en-US/firefox/organizations/faq$1 [PT]
RewriteRule ^/en-US/firefox/central(/?)$ /b/en-US/firefox/central$1 [PT]
RewriteRule ^/en-US/firefox/happy(/?)$ /b/en-US/firefox/happy$1 [PT]
RewriteRule ^/en-US/firefox/speed(/?)$ /b/en-US/firefox/speed$1 [PT]
RewriteRule ^/en-US/firefox/geolocation(/?)$ /b/en-US/firefox/geolocation$1 [PT]
RewriteRule ^/en-US/firefox/channel(/?)$ /b/en-US/firefox/channel$1 [PT]
RewriteRule ^/en-US/firefox/releases(/?)$ /b/en-US/firefox/releases$1 [PT]
# bug 893006
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/update(.*)$ /b/$1firefox/update$2 [PT]
# bug 881754, 883127
# TODO: Remove when all locales are done.
RewriteRule ^/(an|ar|ast|bg|br|ca|cs|csb|cy|da|de|el|eo|es-AR|es-CL|es-ES|es-MX|et|eu|fi|fr|fy-NL|ga-IE|gd|hr|hu|hy-AM|id|is|it|ko|lij|lt|lv|ml|mk|mr|my|nb-NO|nl|pl|pt-BR|pt-PT|rm|ro|ru|sl|sk|sq|sr|sv-SE|te|tr|uk|zh-TW)/firefox/new(/?)$ /b/$1/firefox/new$2 [PT]
# bug 796952, 915845, 915867
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/unsupported/(.+)/index\.html$ /$1firefox/unsupported/$2/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/unsupported/(.*)$ /b/$1firefox/unsupported/$2 [PT]
# bug 757117
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?webmaker(.*)$ /b/$1webmaker$2 [PT]
# bug 760194
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?dnt(.*)$ /b/$1dnt$2 [PT]
# bug 767614
RewriteRule ^/en-US/mobile(/?)$ /b/en-US/mobile$1 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/mobile/features(/?)$ /b/$1firefox/mobile/features$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/mobile/faq(/?)$ /b/$1firefox/mobile/faq$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/mobile/platforms(/?)$ /b/$1firefox/mobile/platforms$2 [PT]
# bug 876668
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?mobile/customize(?:/.*)?$ /$1firefox/mobile/features/ [L,R=301]
# bug 773739
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?products(/?)$ /b/$1products$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox(/(?:\d+\.\d+\.?(?:\d+)?\.?(?:\d+)?(?:[a|b]?)(?:\d*)(?:pre)?(?:\d)?))?/whatsnew(/?)$ /b/$1firefox$2/whatsnew$3 [PT]
# bug 736934
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?(firefox|mobile)/((?:aurora|beta)/)?notes(/?)$ /b/$1$2/$3notes$4 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/system-requirements(\.html)?$ /b/$1firefox/system-requirements$2 [PT]
# bug 778752
RewriteRule ^/en-US/firefox/channel/android(/?)$ /b/en-US/firefox/channel/android$1 [PT]
# bug 784737
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/memory(.*)$ /b/$1firefox/memory$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?styleguide(.*)$ /b/$1styleguide$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/sms(.*)$ /b/$1firefox/sms$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?grants(.*)$ /b/$1grants$2 [PT] # bug 793181
# request to ensure https is present for pluginchecks bug 795291
RewriteCond %{ENV:HTTPS} !on
RewriteRule ^/.*/plugincheck/ https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
# bug 878871
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/os(.*)$ /b/$1firefox/os$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefoxos(.*)$ /$1firefox/os/ [NE,L,R=301]
# bug 797236, 839678
RewriteRule ^/(\w{2,3}(?:-\w{2}(?:-mac)?)?/)?firefox/mobile/faq\?os=firefox-os$ /$1firefox/os/faq/ [R=301]
# bug 797337
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?contribute/areas.html$ /b/$1contribute/areas.html [PT]
# bug 846362
RewriteRule ^/community/index.(de|fr|hr|sq).html$ /contribute/ [L,R=301]
RewriteRule ^/community/(index.html)?$ /contribute/ [L,R=301]
# bug 798453
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/installer-help(.*)$ /b/$1firefox/installer-help$2 [PT]
# bug 801705
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?gameon(.*)$ /b/$1gameon$2 [PT]
# bug 799767
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?book(.*)$ /b/$1book$2 [PT]
# bug 800461
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/brand(.*)$ /b/$1firefox/brand$2 [PT]
# bug 800649
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?privacy/policies/facebook(.*)$ /b/$1privacy/policies/facebook$2 [PT]
# bug 820212
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?privacy/firefox-os/?$ /$1privacy/policies/firefox-os/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?privacy/policies/firefox-os(.*)$ /b/$1privacy/policies/firefox-os$2 [PT]
# bug 807323
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/identity-guidelines(.*)$ /b/$1foundation/identity-guidelines$2 [PT]
# bug 809426
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?legal/eula(/?)$ /b/$1legal/eula$2 [PT]
# bug 811787
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/annualreport/2011(.*)$ /b/$1foundation/annualreport/2011$2 [PT]
# bug 816249
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?privacy(/?)$ /b/$1privacy$2 [PT]
# bug 815731 /ITU/
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?ITU(.*)$ /b/$1ITU$2 [PT]
# bug 821838
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?tabzilla/(.*)$ /b/$1tabzilla/$2 [PT]
# bug 821937
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?m/privacy.html$ /b/$1m/privacy.html [PT]
# bug 683375
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?research(.*)$ /b/$1research$2 [PT]
# bug 822817
RewriteRule ^/telemetry/?$ /b/telemetry/ [PT]
# bug 829091
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/partners(.*)$ /b/$1firefox/partners$2 [PT]
# bug 831810
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?mwc/?$ /$1firefox/partners/ [NC,L,R=301]
# bug 833645
RewriteRule ^/en-US/firefox(/(?:\d+\.\d+\.?(?:\d+)?\.?(?:\d+)?(?:[a|b]?)(?:\d*)(?:pre)?(?:\d)?))?/firstrun(/?)$ /b/en-US/firefox$1/firstrun$2 [PT]
# bug 748503
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?projects/firefox/([^/]+)a[0-9]+/(firstrun|whatsnew)(.*)$ /$1firefox/nightly/firstrun$4 [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/nightly/firstrun(.*)$ /b/$1firefox/nightly/firstrun$2 [PT]
# bug 840814
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?projects/firefox(/(?:\d+\.\d+\.?(?:\d+)?\.?(?:\d+)?(?:[a|b]?)(?:\d*)(?:pre)?(?:\d)?))(/(?:firstrun|whatsnew))(/.*)?$ /$1firefox$2$3$4 [L,R=301]
# bug 845983
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?metrofirefox(/.*)? /$1firefox$2 [L,R=301]
# bug 878926
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefoxflicks/?(.*) https://firefoxflicks.mozilla.org/$1$2 [L,R=301]
# bug 849426
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/history(\.html)?$ /$1about/history/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/history/$ /b/$1about/history/ [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/bookmarks.html$ https://wiki.mozilla.org/Historical_Documents [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/timeline.html$ https://wiki.mozilla.org/Timeline [L,R=301]
# bug 885848
RewriteRule ^/about/index.html$ /about/ [L,R=301]
RewriteRule ^/about/index.(.*)?.html$ /contribute/ [L,R=301]
RewriteCond $1 !en-US/
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)about(?:/(?:index.html)?)$ /contribute/ [L,R=301]
# bug 861243 and bug 869489
RewriteRule ^/about/manifesto\.html$ /about/manifesto/ [L,R=301]
RewriteRule ^/about/manifesto\.(.*)\.html$ /$1/about/manifesto/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/manifesto(/?)$ /b/$1about/manifesto$2 [PT]
# bug 856077
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?projects/toolkit(/?)$ https://developer.mozilla.org/docs/Toolkit_API [L,R=301]
# bug 877165
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/connect.*$ / [L,R=301]
# bug 657049
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/accountmanager/?$ /$1persona/ [L,R=301]
# bug 841846
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/nightly(/?)$ https://nightly.mozilla.org [L,R=302]
# bug 748503
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/nightly/firstrun(.*)$ /b/$1firefox/nightly/firstrun$2 [PT]
# Bug 845904 - /newsletter/existing and /newsletter/updated served from bedrock
# en-US only until translations are done.
RewriteRule ^/en-US/newsletter/existing(.*)$ /b/en-US/newsletter/existing$1 [PT]
RewriteRule ^/en-US/newsletter/updated(.*)$ /b/en-US/newsletter/updated$1 [PT]
# bug 860532 - Reidrects for governance pages
RewriteRule ^/about/governance\.html$ /about/governance/ [L,R=301]
RewriteRule ^/about/roles\.html$ /about/governance/roles/ [L,R=301]
RewriteRule ^/about/organizations\.html$ /about/governance/organizations/ [L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?about/governance(.*)$ /b/$1about/governance$2 [PT]
# bug 790784
# NB: The /foundation/privacy-policy.html redirect must appear before the
# foundation redirects added with bug 724633. Otherwise, the address will first
# be prefixed with a locale, and this redirect will not work.
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?privacy/policies/websites(/?)$ /b/$1privacy/policies/websites$2 [PT]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?privacy-policy(?:\.html)?$ /$1privacy/policies/websites/ [L,R=301]
RewriteRule ^/foundation/privacy-policy\.html$ /privacy/policies/websites/ [L,R=301]
RewriteRule ^/about/policies/privacy-policy\.html$ /privacy/policies/websites/ [L,R=301]
RewriteRule ^/en-US/privacy-policy\.pdf$ https://static.mozilla.com/moco/en-US/pdf/mozilla_privacypolicy.pdf [L,R=301]
# bug 724633 - Porting foundation pages
# Add redirects for the pdfs that were under /foundation/documents/
# that will now be served from static.mozilla.com/foundation/documents/
# (The links within the foundation pages have been updated, but there are
# probably many links to them from other pages and sites that need to keep
# working.)
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/documents/([^/]+).pdf$ https://static.mozilla.com/foundation/documents/$2.pdf [NC,L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/donate_form.pdf$ https://static.mozilla.com/foundation/documents/donate_form.pdf [NC,L,R=301]
# openwebfund/ and openwebfund/index.html redirect to another site. Careful because
# there are other pages under openwebfund that still need to be served from Bedrock.
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/openwebfund/(index.html)?$ https://sendto.mozilla.org/page/contribute/join-mozilla?source=owf_redirect [NC,L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/donate\.html$ https://sendto.mozilla.org/page/contribute/openwebfund [NC,L,R=301]
# FIXUPs for changing foo/index.html to foo/, and foo/bar.html to foo/bar/
# Redirect foundation/index.html -> foundation/
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/index.html$ /$1foundation/ [NC,L,R=301]
# Redirect foundation/foo/bar/index.html -> foundation/foo/bar
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/(.*)/index.html$ /$1foundation/$2/ [NC,L,R=301]
# Redirect foundation/foo.html to foundation/foo/, with a redirect for the nice search engines
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/(about|careers|licensing|moco|mocosc).html$ /$1foundation/$2/ [NC,L,R=301]
# Redirect foundation/anything/foo.html to foundation/anything/foo/, with a redirect for the nice search engines
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/((annualreport|documents|feed-icon-guidelines|licensing|openwebfund|trademarks)/.*).html$ /$1foundation/$2/ [NC,L,R=301]
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation/documents/(index|mozilla-200.-financial-faq).html$ /$1foundation/$2/ [NC,L,R=301]
# Add /b to all foundation URLs to serve them from Bedrock.
# (The old foundation pages had no locale in the URL.
# But when the rewritten locale-less URLs hit Bedrock, Bedrock will return
# a redirect with the locale added. So we need to make sure both kinds of
# URL end up in Bedrock.)
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?foundation(/.*)?$ /b/$1foundation$2 [PT]
# bug 724682
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?projects/mathml/demo/texvsmml.html$ https://developer.mozilla.org/docs/Mozilla_MathML_Project/MathML_Torture_Test [L,R=301]
RewriteRule ^projects/mathml(?:/(?:index.html|demo(?:/(?:index.html)?)?)?)?$ https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project [L,R=301]
RewriteRule ^projects/mathml/fonts(?:/(?:index.html)?)?$ https://developer.mozilla.org/Mozilla_MathML_Project/Fonts [L,R=301]
RewriteRule ^projects/mathml/screenshots(?:/(?:index.html)?)?$ https://developer.mozilla.org/Mozilla_MathML_Project/Screenshots [L,R=301]
# bug 869495
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox/os/releasenotes/1.0.1(.*)$ /b/$1firefox/os/releasenotes/1.0.1$2 [PT]
# bug 818323
RewriteRule ^/projects/security/known-vulnerabilities.html$ /security/known-vulnerabilities/index.html [L,R=301]
RewriteRule ^/projects/security/older-vulnerabilities.html$ /security/known-vulnerabilities/older-vulnerabilities.html [L,R=301]
# bug 860460, 892696
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?newsletter(/?)$ /b/$1newsletter$2 [PT]
# bug 892716
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?firefox(/)?$ /b/$1firefox$2 [PT]
# bug 897195
RewriteRule ^/en-US/newsletter/confirm(.*)$ /b/en-US/newsletter/confirm$1 [PT]
# bug 818321
RewriteRule ^/projects/security/tld-idn-policy-list.html$ /about/governance/policies/security-group/tld-idn/ [L,R=301]
RewriteRule ^/projects/security/membership-policy.html$ /about/governance/policies/security-group/membership/ [L,R=301]
RewriteRule ^/projects/security/secgrouplist.html$ /about/governance/policies/security-group/ [L,R=301]
RewriteRule ^/projects/security/security-bugs-policy.html$ /about/governance/policies/security-group/bugs/ [L,R=301]
# bug 903089
RewriteRule ^/robots.txt$ /b/robots.txt [PT]
# bug 901541
RewriteRule ^/(\w{2,3}(?:-\w{2})?/)?newsletter/recovery(/)?$ /b/$1newsletter/recovery$2 [PT]
#bug 887426
RewriteRule ^/about/policies/participation.html$ /en-US/about/policies/participation/ [L,R=301]
RewriteRule ^/en-US/about/policies/participation(/?)$ /b/en-US/about/policies/participation$1 [PT]
RewriteRule ^/about/policies/policies.html$ /en-US/about/policies/ [L,R=301]
RewriteRule ^/en-US/about/policies/policies(/?)$ /b/en-US/about/policies$1 [PT]