/
.htaccess
executable file
·64 lines (52 loc) · 1.96 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
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
<Files gen>
Order allow,deny
Deny from all
</Files>
<FilesMatch "(\.(bak|config|dist|fla|inc|ini|log|psd|sh|sql|json|lock|swp|xml|twig|gitignore|yml|md|jade|scss|sqlite3|html)|~)$">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
<ifModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
# --- FORZAR HTTPS EN SU SITIO --- #
#RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*)$ https://ocrend.com/$1 [R,L]
# --- FORZAR HTTPS EN SU SITIO --- #
# --- HELP PARA ROUTER DEL FRAMEWORK --- #
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?routing=$1 [QSA,L]
# --- HELP PARA ROUTER DEL FRAMEWORK --- #
</IfModule>
<IfModule mod_headers.c>
# Sirve archivos comprimidos gzip CSS si existen
# y el cliente acepta gzip.
RewriteCond "%{HTTP:Accept-encoding}" "gzip"
RewriteCond "%{REQUEST_FILENAME}\.gz" -s
RewriteRule "^(.*)\.css" "$1\.css\.gz" [QSA]
# Sirve archivos comprimidos gzip JS si existen
# y el cliente acepta gzip.
RewriteCond "%{HTTP:Accept-encoding}" "gzip"
RewriteCond "%{REQUEST_FILENAME}\.gz" -s
RewriteRule "^(.*)\.js" "$1\.js\.gz" [QSA]
# Sirve los tipos de contenido correctos y evita mod_deflate double gzip.
RewriteRule "\.css\.gz$" "-" [T=text/css,E=no-gzip:1]
RewriteRule "\.js\.gz$" "-" [T=text/javascript,E=no-gzip:1]
<FilesMatch "(\.js\.gz|\.css\.gz)$">
# Sirve el tipo de codificación correcto.
Header append Content-Encoding gzip
# Forzar proxies para almacenar en caché gzip y
# archivos css / js no comprimidos por separado.
Header append Vary Accept-Encoding
</FilesMatch>
# --- FORZAR CACHÉ POR 1 MES --- #
#<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|js|xml|txt|css|svg)$">
# Header set Cache-Control "max-age=2592000, public"
#</FilesMatch>
</IfModule>