forked from Bigjoos/U-232-V5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
94 lines (87 loc) · 3.08 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
82
83
84
85
86
87
88
89
90
91
92
93
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
# BEGIN Expire headers
##<ifModule mod_expires.c>
## ExpiresActive On
## ExpiresDefault "access plus 600 seconds"
## ExpiresByType image/x-icon "access plus 2592000 seconds"
## ExpiresByType image/jpeg "access plus 2592000 seconds"
## ExpiresByType image/png "access plus 2592000 seconds"
## ExpiresByType image/gif "access plus 2592000 seconds"
## ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
## ExpiresByType text/css "access plus 604800 seconds"
## ExpiresByType text/javascript "access plus 216000 seconds"
## ExpiresByType application/javascript "access plus 216000 seconds"
## ExpiresByType application/x-javascript "access plus 216000 seconds"
## ExpiresByType text/html "access plus 600 seconds"
## ExpiresByType application/xhtml+xml "access plus 600 seconds"
##</ifModule>
# END Expire headers
# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</ifModule>
# END Cache-Control Headers
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
ExpiresByType text/css "access plus 1 year"
ExpiresByType text/js "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
##ExpiresByType application/pdf "access plus 1 month"
##ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
</IfModule>
## EXPIRES CACHING ##
# BEGIN Gzip compression
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
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>
# END Gzip compression
######################
#ErrorPages
ErrorDocument 400 /error.php?400
ErrorDocument 401 /error.php?401
ErrorDocument 403 /error.php?403
ErrorDocument 404 /error.php?404
#ErrorDocument 404 /404.html
ErrorDocument 500 /error.php?500
##################################################
RewriteEngine On
RewriteRule ^avatar/([_0-9a-z-]+).png /avatar/avatar.php?user=$1
#Header unset ETag
FileETag none