forked from guaycuru/gde
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
69 lines (61 loc) · 3.13 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
Options -MultiViews
RewriteEngine On
# Save the beggining of the URL
RewriteCond %{ENV:URI} ^$
RewriteRule ^(.*)$ - [ENV=URI:$1]
# Save the beggining of the URL
RewriteCond %{ENV:BASE} ^$
RewriteCond %{ENV:URI}::%{REQUEST_URI} ^(.*)::(.*?)\1$
RewriteRule ^ - [ENV=BASE:%2]
# Add trailing slash
# RewriteCond %{REQUEST_URI} !(/$|\.)
# RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]
# Force HTTPS
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} !=on
RewriteCond %{REMOTE_ADDR} !=127.0.0.1
RewriteCond %{HTTP_HOST} !=localhost
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,QSA]
# Home view
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule ^$ views/index.php [L,QSA]
# Rewrite views
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule ^([^/.]+)/?$ views/$1.php [L,QSA]
# Rewrite views with ID
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule ^([^/.]+)/([^/.?&]+)/?$ views/$1.php?id=$2 [L,QSA]
# Old -> New
RewriteRule ^visoes/index\.php$ %{ENV:BASE} [R=302,L,QSA]
RewriteRule ^visoes/Amigos\.php$ %{ENV:BASE}amigos/ [R=302,L,QSA]
RewriteRule ^visoes/Arvore\.php$ %{ENV:BASE}arvore/ [R=302,L,QSA]
RewriteRule ^visoes/Avaliar\.php$ %{ENV:BASE}avaliar/ [R=302,L,QSA]
RewriteRule ^visoes/BemVindo\.php$ %{ENV:BASE} [R=302,L,QSA]
RewriteRule ^visoes/Busca\.php$ %{ENV:BASE}busca/ [R=302,L,QSA]
RewriteRule ^visoes/CadastroGrupo\.php$ %{ENV:BASE} [R=302,L,QSA]
RewriteRule ^visoes/CadastroOportunidade\.php$ %{ENV:BASE} [R=302,L,QSA]
RewriteRule ^visoes/Configuracoes\.php$ %{ENV:BASE}configuracoes/ [R=302,L,QSA]
RewriteRule ^visoes/Contato\.php$ %{ENV:BASE}contato/ [R=302,L,QSA]
RewriteRule ^visoes/Disciplina\.php$ %{ENV:BASE}disciplina/ [R=302,L,QSA]
RewriteRule ^visoes/EditarPerfil\.php$ %{ENV:BASE}editar-perfil/ [R=302,L,QSA]
RewriteRule ^visoes/Eliminador\.php$ %{ENV:BASE}eliminador/ [R=302,L,QSA]
RewriteRule ^visoes/Estatisticas\.php$ %{ENV:BASE}estatisticas/ [R=302,L,QSA]
RewriteRule ^visoes/FAQ\.php$ https://github.com/guaycuru/gde/wiki/FAQ [R=302,L,QSA]
RewriteRule ^visoes/Grupo\.php$ %{ENV:BASE} [R=302,L,QSA]
RewriteRule ^visoes/Grupos\.php$ %{ENV:BASE} [R=302,L,QSA]
RewriteRule ^visoes/Imprimir_Horario\.php$ %{ENV:BASE}imprimirhorario/ [R=302,L,QSA]
RewriteRule ^visoes/Mapa\.php$ %{ENV:BASE}mapa/ [R=302,L,QSA]
RewriteRule ^visoes/MuralOportunidades\.php$ %{ENV:BASE} [R=302,L,QSA]
RewriteRule ^visoes/Oferecimento\.php$ %{ENV:BASE}oferecimento/ [R=302,L,QSA]
RewriteRule ^visoes/Perfil\.php$ %{ENV:BASE}perfil/ [R=302,L,QSA]
RewriteRule ^visoes/Planejador\.php$ %{ENV:BASE}planejador/ [R=302,L,QSA]
RewriteRule ^visoes/Rankings\.php$ %{ENV:BASE} [R=302,L,QSA]
RewriteRule ^visoes/Recomendar\.php$ %{ENV:BASE} [R=302,L,QSA]
RewriteRule ^visoes/Sala\.php$ %{ENV:BASE}sala/ [R=302,L,QSA]
RewriteRule ^visoes/Sobre\.php$ %{ENV:BASE}sobre/ [R=302,L,QSA]
RewriteRule ^visoes/Termos\.php$ %{ENV:BASE}termos/ [R=302,L,QSA]
RewriteRule ^visoes/ValidaEmail\.php$ %{ENV:BASE}validar-email/ [R=302,L,QSA]
RewriteRule ^visoes/VisaoCadastro\.php$ %{ENV:BASE}cadastro/ [R=302,L,QSA]
RewriteRule ^visoes/VisaoLogin\.php$ %{ENV:BASE}login/ [R=302,L,QSA]