forked from mozillahispano/mozilla-hispano.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
269 lines (205 loc) · 10 KB
/
.htaccess
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
# Importante para que funcione la documentacion y el planet
SetEnv PHP_VER 5
SetEnv REGISTER_GLOBALS 0
SetEnv ZEND_OPTIMIZER 1
SetEnv MAGIC_QUOTES 0
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
# Apuntamos el .com al .org
RewriteCond %{HTTP_HOST} ^mozilla-hispano\.com$ [NC]
RewriteRule ^(.*)$ http://www.mozilla-hispano.org/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.mozilla-hispano\.com$ [NC]
RewriteRule ^(.*)$ http://www.mozilla-hispano.org/$1 [R=301,L]
# Apuntamos mozillahispano.org a mozilla-hispano.org
RewriteCond %{HTTP_HOST} ^mozillahispano\.org$ [NC]
RewriteRule ^(.*)$ http://www.mozilla-hispano.org/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.mozillahispano\.org$ [NC]
RewriteRule ^(.*)$ http://www.mozilla-hispano.org/$1 [R=301,L]
# Obligamos el uso de www en el .org
RewriteCond %{HTTP_HOST} ^mozilla-hispano\.org$ [NC]
RewriteRule ^(.*)$ http://www.mozilla-hispano.org/$1 [R=301,L]
#Django cache
RewriteRule ^/qa$ http://www.mozilla-hispano.org/qa/ [R,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(qa/)$ cache/index.html [L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(qa/testing/)$ cache/products.html [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(qa/help/)$ cache/help.html [L]
#Django
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(qa/.*|qa$) django.cgi/$1 [L]
#Fiesta Madrid págna estáca
Redirect /launchparty http://www.mozilla-hispano.org/eventos/fx35madrid
#Redirects de antiguas URL de DC
RewriteRule /[0-9]+-([a-z0-9\-]+) $1 [R=301,L]
Redirect 301 /labs/tuentifox/ayuda.php http://www.mozilla-hispano.org/labs/tuentifox/manual/
Redirect 301 /labs/tuentifox/releasenotes/tuentifox-0.2.3.html http://www.mozilla-hispano.org/labs/tuentifox/023/
Redirect 301 /labs/tuentifox/releasenotes/tuentifox-0.2.2.html http://www.mozilla-hispano.org/labs/tuentifox/022/
Redirect 301 /labs/tuentifox/releasenotes/tuentifox-0.2.html http://www.mozilla-hispano.org/labs/tuentifox/022/
Redirect 301 /labs/tuentifox/releasenotes/tuentifox-0.2.1.html http://www.mozilla-hispano.org/labs/tuentifox/022/
Redirect 301 /themes/mozillahispano/js/cabecera.js http://www.mozilla-hispano.org/wp-content/themes/mozillahispano/js/cabecera.js
Redirect 301 /themes/mozillahispano/css/paisaje.css http://www.mozilla-hispano.org/wp-content/themes/mozillahispano/css/paisaje.css
Redirect 301 /themes/mozillahispano/css/iebugs.css http://www.mozilla-hispano.org/wp-content/themes/mozillahispano/css/iebugs.css
Redirect 301 _rss.php /feed/
Redirect 301 /labs/tuentifox/update/tuentiPatters.xml http://www.mozilla-hispano.org/archivos/labs/tuentifox/update/tuentiPatters.xml
Redirect 301 /labs/tuentifox/update/update.txt http://www.mozilla-hispano.org/archivos/labs/tuentifox/update/update.txt
Redirect 301 /labs/tuentifox/actualizacion.php http://www.mozilla-hispano.org/labs/tuentifox/actualizacion/
# Tuentifox a TFox
Redirect 301 /labs/tuentifox http://www.mozilla-hispano.org/labs/tfox/
Redirect 301 /labs/tuentifox/actualizacion http://www.mozilla-hispano.org/labs/tfox/actualizacion/
Redirect 301 /labs/tuentifox/manual http://www.mozilla-hispano.org/labs/tfox/manual/
Redirect /labs/tfox/039 http://www.mozilla-hispano.org/labs/tfox/tfox-0-3-9/
Redirect /labs/tfox/04 http://www.mozilla-hispano.org/labs/tfox/tfox-0-4/
# Firefox 4
Redirect /firefox4/qr/ http://www.mozilla-hispano.org/difusion/firefox4/
Redirect /firefox4 http://www.mozilla-hispano.org/difusion/firefox4
#Calendario de eventos
Redirect 301 /difusion/eventos/ http://www.mozilla-hispano.org/documentacion/Eventos
# Pagina colabora con url bonita
Redirect /participa https://www.mozilla-hispano.org/documentacion/Colabora
# Wiki a SUMO
Redirect 301 /documentacion/Detección_básica_de_problemas https://support.mozilla.org/es/kb/resolucion-y-diagnostico-de-problemas-con-firefox
Redirect 301 /documentacion/Documentos_sobre_Firefox https://support.mozilla.org/es/products/firefox
Redirect 301 /documentacion/Documentos_sobre_Thunderbird https://support.mozilla.org/es/products/thunderbird
Redirect 301 /documentacion/Firefox_no_se_inicia https://support.mozilla.org/es/kb/firefox-no-se-inicia-encuentra-una-solucion
# Top visitas
Redirect 301 /documentacion/Desinstalar_Firefox_en_Windows https://support.mozilla.org/es/kb/desinstalar-firefox-de-tu-equipo
Redirect 301 /documentacion/Descargar_e_instalar_Firefox "https://support.mozilla.org/es/kb/Instalar%20Firefox%20en%20Windows"
# Antiguos foros de asistencia
RewriteCond %{QUERY_STRING} ^f=1$
RewriteRule ^(.*)$ https://support.mozilla.org/es/questions/new? [R=301,L]
RewriteCond %{QUERY_STRING} ^f=2$
RewriteRule ^(.*)$ https://support.mozilla.org/es/questions/new/desktop? [R=301,L]
RewriteCond %{QUERY_STRING} ^f=46$
RewriteRule ^(.*)$ https://support.mozilla.org/es/questions/new/mobile? [R=301,L]
RewriteCond %{QUERY_STRING} ^f=3$
RewriteRule ^(.*)$ https://support.mozilla.org/es/questions/new/thunderbird? [R=301,L]
RewriteCond %{QUERY_STRING} ^f=47$
RewriteRule ^(.*)$ https://support.mozilla.org/es/questions/new/firefox-os? [R=301,L]
# Antiguos foros de comunidad
RewriteCond %{QUERY_STRING} f=6
RewriteRule ^(.*)$ https://foro.mozilla-hispano.org/? [R=301,L]
RewriteCond %{QUERY_STRING} f=12
RewriteRule ^(.*)$ https://foro.mozilla-hispano.org/c/participa-en-el-proyecto? [R=301,L]
RewriteCond %{QUERY_STRING} f=16
RewriteRule ^(.*)$ https://foro.mozilla-hispano.org/c/discusion-general? [R=301,L]
RewriteCond %{QUERY_STRING} f=26
RewriteRule ^(.*)$ https://foro.mozilla-hispano.org/c/difusion-eventos? [R=301,L]
RewriteCond %{QUERY_STRING} f=27
RewriteRule ^(.*)$ https://foro.mozilla-hispano.org/c/difusion-eventos? [R=301,L]
RewriteCond %{QUERY_STRING} f=35
RewriteRule ^(.*)$ https://foro.mozilla-hispano.org/c/noticias? [R=301,L]
RewriteCond %{QUERY_STRING} f=7
RewriteRule ^(.*)$ https://foro.mozilla-hispano.org/c/traduccion? [R=301,L]
RewriteCond %{QUERY_STRING} f=25
RewriteRule ^(.*)$ https://foro.mozilla-hispano.org/c/labs? [R=301,L]
RewriteCond %{QUERY_STRING} f=17
RewriteRule ^(.*)$ https://foro.mozilla-hispano.org/c/presentaciones-mentoria? [R=301,L]
RewriteCond %{QUERY_STRING} f=14
RewriteRule ^(.*)$ https://foro.mozilla-hispano.org/c/miembros? [R=301,L]
RewriteCond %{QUERY_STRING} f=50
RewriteRule ^(.*)$ https://foro.mozilla-hispano.org/c/discusion-general/firefox-os? [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
#### ---- Inicio otras optimizaciones
# ----------------------------------------------------------------------
# Proper MIME type for all files
# ----------------------------------------------------------------------
# audio
AddType audio/ogg oga ogg
# video
AddType video/ogg ogv
AddType video/webm webm
# Proper svg serving. Required for svg webfonts on iPad
# twitter.com/FontSquirrel/status/14855840545
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
# webfonts
AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType font/opentype otf
AddType application/x-font-woff woff
# assorted types
AddType image/x-icon ico
AddType image/webp webp
AddType text/cache-manifest appcache manifest
AddType text/x-component htc
AddType application/x-xpinstall xpi
#js
AddType text/javascript .js?
# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------
# use utf-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8
# force utf-8 for a number of file formats
AddCharset utf-8 .html .css .js .xml .json .rss
# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# your document html
ExpiresByType text/html "access plus 0 seconds"
# data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# rss feed
ExpiresByType application/rss+xml "access plus 1 hour"
# favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
# media: images, video, audio
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# htc files (css3pie)
ExpiresByType text/x-component "access plus 1 month"
# webfonts
ExpiresByType font/truetype "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
# css and javascript
ExpiresByType text/css "access plus 2 months"
ExpiresByType application/javascript "access plus 2 months"
ExpiresByType text/javascript "access plus 2 months"
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IfModule>
</IfModule>
# ----------------------------------------------------------------------
# ETag removal
# ----------------------------------------------------------------------
# Since we're sending far-future expires, we don't need ETags for
# static content.
# developer.yahoo.com/performance/rules.html#etags
FileETag None
# BEGIN GZIP
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</ifmodule>
# END GZIP