summaryrefslogtreecommitdiffstats
path: root/.htaccess
blob: b07ce9a0d69f8c5cc790562444bb51147e8522d4 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# 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>
<IfModule mod_expires.c>
<IfModule mod_headers.c>
<IfModule mod_env.c>
  <FilesMatch (\.js|\.css)$>
    ExpiresActive On
    # According to RFC 2616, "1 year in the future" means "never expire".
    # We change the name of the file's URL whenever its modification date
    # changes, so browsers can cache any individual JS or CSS URL forever.
    # However, since all JS and CSS URLs involve a ? in them (for the changing
    # name) we have to explicitly set an Expires header or browsers won't
    # *ever* cache them.
    ExpiresDefault "now plus 1 years"
    Header append Cache-Control "public"
  </FilesMatch>

  # This lets Bugzilla know that we are properly sending Cache-Control
  # and Expires headers for CSS and JS files.
  SetEnv BZ_CACHE_CONTROL 1
</IfModule>
</IfModule>
</IfModule>

# Allow ZeroClipboard for access to the clipboard
<Files "ZeroClipboard.swf">
  allow from all
</Files>

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

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

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]

# 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 ^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[\.:]it$ enter_bug.cgi?product=Mozilla+Reps&format=remo-it [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=Mozilla+Developer+Network&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[\.:]fxos[\.\-:]preload[\.\-:]app$ enter_bug.cgi?product=Marketplace&format=fxos-preload-app [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[\.:]third[\.\-:]party$ enter_bug.cgi?product=Marketing&format=third-party-apps [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)$ enter_bug.cgi?product=Marketing&format=ipc [QSA]
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 ^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 ^data/assets/ZeroClipboard.swf(.*)$ extensions/BugModal/web/ZeroClipboard/ZeroClipboard.swf$1 [NE]
RewriteRule ^login$ index.cgi?GoAheadAndLogIn=1 [NE]