-
Notifications
You must be signed in to change notification settings - Fork 16
/
.htaccess
60 lines (49 loc) · 1.5 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
# Disable directory listing
Options -Indexes +FollowSymLinks
# Protect hidden files, some specific files and some file types from being viewed
<Files .*>
Order Deny,Allow
Deny From All
Satisfy All
</Files>
<Files config.json>
Order Deny,Allow
Deny From All
Satisfy All
</Files>
<FilesMatch ^(Gruntfile|gulpfile)\.js$>
Order Deny,Allow
Deny From All
Satisfy All
</FilesMatch>
<FilesMatch "\.(tpl|yml|ftl|less|scss|json|xml|md|conf|log|txt|bat|sh)$">
Order Deny,Allow
Deny From All
Satisfy All
</FilesMatch>
# Routing
RewriteEngine On
RewriteRule ^admin/assets/(.*) app/admin/public/assets/$1 [P,L]
RewriteRule ^admin$ admin/ [L]
# prevent access not from localhost
RewriteCond %{HTTP_HOST} ^127.0.0.1$ [OR]
RewriteCond %{HTTP_HOST} ^local [OR]
RewriteCond %{HTTP_HOST} ^addyourownhosthereif$
RewriteRule ^admin/(.*) app/admin/public/index.php?uriparts=$1 [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# everything else goes trough Deeplio.php
RewriteRule . app/deeplio/Deeplio.php [L]
# Compression
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
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>