-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
30 lines (23 loc) · 906 Bytes
/
.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
#RewriteEngine On
#Options All -Indexes
# ROUTER WWW Redirect.
#RewriteCond %{HTTP_HOST} !^www\. [NC]
#RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# ROUTER HTTPS Redirect
#RewriteCond %{HTTP:X-Forwarded-Proto} !https
#RewriteCond %{HTTPS} off
#RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# ROUTER URL Rewrite
# RewriteCond %{SCRIPT_FILENAME} !-f
# RewriteCond %{SCRIPT_FILENAME} !-d
#RewriteRule ^(.*)$ index.php?route=/$1 [L,QSA]
# RewriteRule ^(.*)$ index.php [NC,L,QSA]
# Ativação do RewriteEngine que nos permite gerenciar as rotas
RewriteEngine On
# Definição da rota principal
RewriteBase /
# Se o diretório ou arquivos digitados na URL não existirem, seguir a RewriteRule
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
# Rewrite Rule, redirecionar todas as requests para o index.php
RewriteRule ^(.+)$ index.php [QSA,L]