-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
81 lines (66 loc) · 2.38 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
70
71
72
73
74
75
76
77
78
79
80
81
##
## PHREEZE ACCESS RULES FOR APACHE
## VERSION 1.3.2
##
## PHP ERROR REPORTING
# php_flag display_errors 1
# php_value error_reporting 1 # (or 8191 for all errors)
# php_flag asp_tags 0
## PHP MAGIC QUOTES
# php_flag magic_quotes_gpc Off
## PHP SESSION SECURITY
# php_value session.cookie_httponly 1
# php_value session.use_only_cookies 1
## PHP FILE UPLOAD LIMITS
# php_value upload_max_filesize 3M
# php_value post_max_size 3M
# php_value max_execution_time 200
# php_value max_input_time 200
<IfModule mod_rewrite.c>
Options +FollowSymLinks
Options -MultiViews
RewriteEngine On
## TODO: some hosts require the app root must be specified
# RewriteBase /
# Optionally disable trace request method for security
# RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
# RewriteRule .* - [F]
# Redirect all requests to index.php unless the directory, file or link exists
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*) index.php?_REWRITE_COMMAND=$1 [QSA,L]
</IfModule>
# if supported, enable gzip compression on text content
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript text/javascript
</ifmodule>
# if supported, enable caching
<IfModule mod_expires.c>
ExpiresActive On
# styles and scripts
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
# images
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 week"
ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
# fonts
ExpiresByType application/vnd.ms-fontobject "access plus 1 week"
ExpiresByType application/x-font-ttf "access plus 1 week"
ExpiresByType application/x-font-opentype "access plus 1 week"
ExpiresByType application/x-font-woff "access plus 1 week"
ExpiresByType image/svg+xml "access plus 1 week"
ExpiresDefault "now"
</IfModule>
# Add correct mime type for web fonts to supress browser warnings
<IfModule mod_mime.c>
AddType application/vnd.ms-fontobject eot
AddType font/opentype otf
AddType font/truetype ttf
AddType application/font-woff woff
</IfModule>