This repository has been archived by the owner on Apr 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.htaccess
executable file
·64 lines (51 loc) · 1.57 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
AddDefaultCharset UTF-8
IndexIgnore */*
php_value date.timezone UTC
# Make sure that only index.php is called
DirectoryIndex index.php
#php_value short_open_tag 1
<IfModule mod_rewrite.c>
RewriteEngine on
# Use gzipped static files if they exist
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{HTTP_USER_AGENT} !Konqueror
RewriteCond %{REQUEST_FILENAME}.gz -f
RewriteRule ^(.*)\.(css|js)$ $1.$2.gz [QSA,L]
<FilesMatch \.css\.gz$>
ForceType text/css
</FilesMatch>
<FilesMatch \.js\.gz$>
ForceType text/javascript
</FilesMatch>
<IfModule mod_mime.c>
AddEncoding gzip .gz
</IfModule>
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php [L]
# Forward dangerous paths to index.php
RewriteCond %{REQUEST_FILENAME} (.*/)?\.svn/ [OR]
RewriteCond %{REQUEST_FILENAME} \.git/ [OR]
RewriteCond %{REQUEST_FILENAME} \.gitignore$ [OR]
RewriteCond %{REQUEST_FILENAME} protected/ [OR]
RewriteCond %{REQUEST_FILENAME} framework/
RewriteRule . index.php [L]
</IfModule>
<FilesMatch ".(htaccess|htpasswd|ini|phps|fla|psd|log|sh|lock|gitignore)$">
Order Allow,Deny
Deny from all
</FilesMatch>
<Files README.md>
Order Allow,Deny
Deny from all
</Files>
<Files .htaccess>
Order Allow,Deny
Deny from all
</Files>
<Files composer.json>
Order Allow,Deny
Deny from all
</Files>