forked from bbalet/jorani
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
63 lines (54 loc) · 1.99 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
SetEnv ALLOW_OVERWRITE On
SetEnv HTTP_MOD_GZIP Off
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
# Tell PHP that the mod_rewrite module is ENABLED.
SetEnv HTTP_MOD_REWRITE On
# Example showing how to force HTTPS
#RewriteCond %{HTTPS} !=on
#RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R,QSA,L,NE]
#Remove index.php from URL
RewriteCond $1 !^(index\.php|(.*)\.images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]
</IfModule>
<IfModule !mod_rewrite.c>
# Without mod_rewrite, route 404's to the front controller
SetEnv HTTP_MOD_REWRITE Off
ErrorDocument 404 "Error : Module rewrite is not available. Please check your system with requirements.php"
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.(php|xls|xlsx)$">
Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform, must-revalidate"
Header set Pragma "no-cache"
</FilesMatch>
</IfModule>
<IfModule mod_deflate.c>
SetEnv HTTP_MOD_GZIP On
</IfModule>
<IfModule !mod_headers.c>
#On WAMP, Deflate module needs mod_headers, otherwise it cause an error 500
SetEnv HTTP_MOD_GZIP Off
</IfModule>
<IfModule mod_headers.c>
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript
</IfModule>
</IfModule>
</IfModule>
<ifModule mod_gzip.c>
#Enable compression if available
SetEnv HTTP_MOD_GZIP On
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>