summaryrefslogtreecommitdiffstats
path: root/.htaccess
blob: d9681baa6248449ba0326c4c2b0b9bd4a884dcd9 (plain)
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
# Don't allow people to retrieve non-cgi executable files or our private data
<FilesMatch (\.pm|\.pl|\.tmpl|\.swf|localconfig.*|cpanfile)$>
  deny from all
</FilesMatch>

AddType image/x-icon .ico
AddType application/font-woff .woff
AddType application/font-woff2 .woff2

Redirect permanent /queryhelp.cgi https://bugzilla.mozilla.org/query.cgi?format=advanced&help=1
Redirect permanent /bug_status.html https://bugzilla.mozilla.org/page.cgi?id=fields.html
Redirect permanent /bugwritinghelp.html https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html
Redirect permanent /etiquette.html https://bugzilla.mozilla.org/page.cgi?id=etiquette.html
Redirect permanent /duplicates.html https://bugzilla.mozilla.org/duplicates.cgi
Redirect permanent /quicksearch.html https://bugzilla.mozilla.org/page.cgi?id=quicksearch.html
Redirect permanent /bugwritinghelp.html https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html

RewriteEngine On
# This rewrite rule skips over the rest, which is good because the load balancers
# might hit this file once a second and we want apache to not take much time.
# Note that this file is generated by checksetup.pl
RewriteRule ^__lbheartbeat__$ - [L]

# allow cloud-services to identify the version we're running.
# version.json is also generated by checksetup.pl
RewriteRule ^__version__$ version.json [L]

# Unlike lbheartbeat, this endpoint is called less frequently (every five minutes or so)
# heartbeat.cgi returns 200 if the DB and memcached are both working, and 500 otherwise.
RewriteRule ^__heartbeat__$ heartbeat.cgi [L]

RewriteRule ^static/v\d{4}\d{2}\d{2}\.\d+/(.+\.(?:js|css|woff2?|png|jpe?g|gif|ico|svg))$ $1 [NC,E=IMMUTABLE:1,L]
Header set Cache-Control "public, max-age=31536000" env=REDIRECT_IMMUTABLE

RewriteRule ^robots\.txt$ robots.cgi [L]

# New single page interface for filing bugs
RewriteRule ^new[-_]bug$ new_bug.cgi [L,QSA]

RewriteRule ^template_cache/ - [F,L,NC]
RewriteRule ^template_cache.deleteme/ - [F,L,NC]
RewriteRule ^review$ page.cgi?id=splinter.html$1 [QSA]
RewriteRule ^user_?profile$ page.cgi?id=user_profile.html$1 [QSA]
RewriteRule ^request_defer$ page.cgi?id=request_defer.html$1 [QSA]
RewriteRule ^([0-9]+)$ show_bug.cgi?id=$1 [QSA]
RewriteRule ^favicon\.ico$ extensions/BMO/web/images/favicon.ico
RewriteRule ^form[\.:]itrequest$ enter_bug.cgi?product=Infrastructure+\%26+Operations&format=itrequest [QSA]
RewriteRule ^form[\.:](mozlist|poweredby|presentation|trademark|recoverykey)$ enter_bug.cgi?product=mozilla.org&format=$1 [QSA]
RewriteRule ^form[\.:]legal$ enter_bug.cgi?product=Legal&format=legal [QSA]
RewriteRule ^form[\.:]recruiting$ enter_bug.cgi?product=Recruiting&format=recruiting [QSA]
RewriteRule ^form[\.:]intern$ enter_bug.cgi?product=Recruiting&format=intern [QSA]
RewriteRule ^form[\.:]mozpr$ enter_bug.cgi?product=Mozilla+PR&format=mozpr [QSA]
RewriteRule ^form[\.:]reps[\.:]mentorship$ enter_bug.cgi?product=Mozilla+Reps&format=mozreps [QSA]
RewriteRule ^form[\.:]reps[\.:]budget$ enter_bug.cgi?product=Mozilla+Reps&format=remo-budget [QSA]
RewriteRule ^form[\.:]reps[\.:]swag$ enter_bug.cgi?product=Mozilla+Reps&format=remo-swag [QSA]
RewriteRule ^form[\.:]reps[\.:]payment$ page.cgi?id=remo-form-payment.html [QSA]
RewriteRule ^form[\.:]csa[\.:]discourse$ enter_bug.cgi?product=Infrastructure+\%26\+Operations&format=csa-discourse [QSA]
RewriteRule ^form[\.:]employee[\.\-:]incident$ enter_bug.cgi?product=mozilla.org&format=employee-incident [QSA]
RewriteRule ^form[\.:]brownbag$ https://air.mozilla.org/requests [QSA]
RewriteRule ^form[\.:]finance$ enter_bug.cgi?product=Finance&format=finance [QSA]
RewriteRule ^form[\.:]moz[\.\-:]project[\.\-:]review$ enter_bug.cgi?product=mozilla.org&format=moz-project-review [QSA]
RewriteRule ^form[\.:]docs?$ enter_bug.cgi?product=Developer+Documentation&format=doc [QSA]
RewriteRule ^form[\.:]mdn?$ enter_bug.cgi?product=developer.mozilla.org&format=mdn [QSA]
RewriteRule ^form[\.:](swag|gear)$ enter_bug.cgi?product=Marketing&format=swag [QSA]
RewriteRule ^form[\.:]costume$ enter_bug.cgi?product=Marketing&format=costume [QSA]
RewriteRule ^form[\.:]ipp$ enter_bug.cgi?product=Internet+Public+Policy&format=ipp [QSA]
RewriteRule ^form[\.:]creative$ enter_bug.cgi?product=Marketing&format=creative [QSA]
RewriteRule ^form[\.:]user[\.\-:]engagement$ enter_bug.cgi?product=Marketing&format=user-engagement [QSA]
RewriteRule ^form[\.:]dev[\.\-:]engagement[\.\-\:]event$ enter_bug.cgi?product=Developer+Engagement&format=dev-engagement-event [QSA]
RewriteRule ^form[\.:]mobile[\.\-:]compat$ enter_bug.cgi?product=Tech+Evangelism&format=mobile-compat [QSA]
RewriteRule ^form[\.:]web[\.:]bounty$ enter_bug.cgi?product=mozilla.org&format=web-bounty  [QSA]
RewriteRule ^form[\.:]automative$ enter_bug.cgi?product=Testing&format=automative [QSA]
RewriteRule ^form[\.:]comm[\.:]newsletter$ enter_bug.cgi?product=Marketing&format=comm-newsletter [QSA]
RewriteRule ^form[\.:]screen[\.:]share[\.:]whitelist$ enter_bug.cgi?product=Firefox&format=screen-share-whitelist [QSA]
RewriteRule ^form[\.:]data[\.\-:]compliance$ enter_bug.cgi?product=Data+Compliance&format=data-compliance [QSA]
RewriteRule ^form[\.:]fsa[\.:]budget$ enter_bug.cgi?product=FSA&format=fsa-budget [QSA]
RewriteRule ^form[\.:]triage[\.\-]request$ page.cgi?id=triage_request.html [QSA]
RewriteRule ^form[\.:](crm|CRM)$ enter_bug.cgi?product=Marketing&format=crm [QSA]
RewriteRule ^form[\.:](ipc|IPC)$ https://airtable.com/shrcMqgbj1H9gXRlp [R,L]
RewriteRule ^form[\.:]nda$ enter_bug.cgi?product=Legal&format=nda [QSA]
RewriteRule ^form[\.:]name[\.:]clearance$ enter_bug.cgi?product=Legal&format=name-clearance [QSA]
RewriteRule ^form[\.:]shield[\.:]studies$ enter_bug.cgi?product=Shield&format=shield-studies [QSA]
RewriteRule ^form[\.:]client[\.:]bounty$ enter_bug.cgi?product=Firefox&format=client-bounty [QSA]
RewriteRule ^rest - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^rest/(.*)$ rest.cgi/$1 [NE]
RewriteRule ^(?:latest|1\.2|1\.3)/(.*)$ extensions/BzAPI/bin/rest.cgi/$1 [NE]
RewriteRule ^bzapi/(.*)$ extensions/BzAPI/bin/rest.cgi/$1 [NE]
RewriteRule ^login$ index.cgi?GoAheadAndLogIn=1 [NE]