-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
executable file
·44 lines (36 loc) · 1.16 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
# git expoit fix
RedirectMatch 403 ^/.git/.*$
# 404
ErrorDocument 404 /error/404/
<If "%{REQUEST_URI} =~ m#^/api/v1/#">
ErrorDocument 404 /api/v1/system/errors/404.php?request_uri=%{REQUEST_URI}
</If>
####################
# MAINTENANCE MODE
####################
ErrorDocument 503 /error/maintenance/
<If "-e '%{DOCUMENT_ROOT}/site_maintenance_on'">
RewriteEngine On
RewriteCond %{REQUEST_URI} !/error [NC]
RewriteCond %{REQUEST_URI} !\.(js|css|png|jpg) [NC]
# serve default 503 response
RewriteRule .* /error/maintenance/ [R=503,L]
</If>
#############
# TYPES FIX #
#############
AddType text/css .css
AddType text/javascript .js
RewriteEngine on
RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L]
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>