forked from nezamy/route
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
43 lines (38 loc) · 1.39 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
# Use PHP5.6 Single php.ini as default
AddHandler application/x-httpd-php56s .php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
#deny .htaccess from directly access.
<Files ".htaccess">
order allow,deny
deny from all
</Files>
# If you get 'No input file specified'. message or you have problems with FastCGI.
# Remove (#) from beginning Options +ExecCGI.
Options +ExecCGI
##
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
##
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript text/css text/html text/xml application/json
</IfModule>
##
# mod_gzip is an external extension module for Apache that allows you to quickly and easily compress your files before you send them to the client.
# This speeds up your site like crazy!
# If your hosting provider has mod_gzip module enabled start GZIP.
##
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl|tpl)$
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>