-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.htaccess
80 lines (59 loc) · 2.22 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
# set expire headers by file type:
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault A60
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 week"
ExpiresByType text/css "access plus 1 week"
# NOTE: deactivate the js expiry settings (next to lines) temporary when applying js-changes!
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
</IfModule>
# dont add ETag statenent into response of file based documents:
FileETag none
Options +FollowSymLinks
<IfModule mod_deflate.c>
# compress text/ html/ xml/ javascript / json output:
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/json
# Header append Vary Accept-Encoding
</IfModule>
DirectoryIndex index.html index.php
# Enable mod rewrite
RewriteEngine on
# Disallow any .svn directory browsing
RedirectMatch 403 /\\.svn(/|$)
# Disallow any log file viewing from web
RedirectMatch 403 (.*)\.log$
# Disallow any .phpsh viewing from web
RedirectMatch 403 (.*)\.phpsh$
# Disallow any file download from web
RedirectMatch 403 /files/*
# Disallow any backup file download from web
RedirectMatch 403 /backup/(.*)
# Disallow any log file download from web
RedirectMatch 403 /log/(.*)
# Disallow access to composer folder
RedirectMatch 403 /vendor/(.*)
# Disallow file download from cache
RedirectMatch 403 /cache/language/(.*)
RedirectMatch 403 /cache/tmpl/(.*)
# Disallow any direct file access (in extensions)
RedirectMatch 403 /ext/(.*)/config/(.*)
RedirectMatch 403 /ext/(.*)/controller/(.*)
RedirectMatch 403 /ext/(.*)/model/(.*)
RedirectMatch 403 /ext/(.*)/locale/(.*)
RedirectMatch 403 /ext/(.*)/test/(.*)
RedirectMatch 403 /ext/(.*)/view/(.*)
RedirectMatch 403 /ext/(.*)/cli/(.*)
# Force php5 (instead 4)
#AddType application/x-httpd-php5 .php
## Problems running todoyu. Comment AddType (with a #) and try one of this alternatives:
# AddHandler application/x-httpd-php .php
# AddHandler x-mapp-php5 .php
# AddHandler x-httpd-php5 .php
# AddHandler php-fastcgi .php
# AddHandler php-cgi2 .php
# AddHandler php5-cgi .php
# AddHandler php-fastcgi5 .php