-
Notifications
You must be signed in to change notification settings - Fork 3
/
.htaccess
74 lines (58 loc) · 2.73 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
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby
AddOutputFilterByType DEFLATE text/html
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch ^HMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
</IfModule>
<Files VERSAO.txt>
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</Files>
<IfModule mod_headers.c>
Header set Content-Language "pt, en"
</IfModule>
RewriteEngine On
# Redireciona para página de doação
RewriteRule ^doe$ https://vagalume.colabore.org/inicial/people/new/ [R=302,L]
# Redireciona para página de doação em inglês
RewriteRule ^donate$ https://www.globalgiving.org/projects/quality-education-to-15000-amazon-children/?show=recurring [R=302,L]
# Correções de SEO do Google
RewriteCond %{QUERY_STRING} ^id=([0-9]*)$
RewriteRule ^interna\.php$ http://arquivo.vagalume.org.br/interna/%1? [L,R=301]
RewriteCond %{QUERY_STRING} ^id=([0-9]*)$
RewriteRule ^interna_atuacao\.php$ http://arquivo.vagalume.org.br/interna_atuacao/%1? [L,R=301]
RewriteCond %{QUERY_STRING} ^id=([0-9]*)$
RewriteRule ^noticia\.php$ http://arquivo.vagalume.org.br/noticia/%1? [L,R=301]
# Redireciona para WWW (veja www.yes-www.org)
RewriteCond %{HTTP_HOST} ^vagalume\.org\.br$ [NC]
RewriteRule ^(.*)$ https://www.vagalume.org.br/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^staging.vagalume\.org\.br$ [NC]
RewriteRule ^(.*)$ https://www.staging.vagalume.org.br/$1 [R=301,L]
# Redireciona para https
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} vagalume\.org\.br$ [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Para as páginas não encontradas, vamos redirecionar para arquivo.vagalume.org.br com 302,
# pois não queremos que o redirecionamento seja permanente.
# Há páginas que eventualmente irão migrar para o site novo, como por exemplo 'quem-somos'
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://arquivo.vagalume.org.br/$1 [L,R=302]