-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
67 lines (54 loc) · 2.02 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
RewriteEngine On
# The following will redirect all unexpected visitor to
# other domain,
# usefull for development purposes
# RewriteBase /
# RewriteCond %{REMOTE_HOST} !^192.168.1.1
# RewriteRule .* http://opoink-host.com [R=302,L]
# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l
## RewriteCond %{REQUEST_FILENAME} -l [OR]
## RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [L]
# The following rewrites all other queries to index.php. The
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting or installed the project in a subdirectory,
# the base path will be prepended to allow proper resolution of
# the index.php file; it will work in non-aliased environments
# as well, providing a safe, one-size fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}/index.php [L]
<IfModule mod_expires.c>
ExpiresActive On
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 text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType image/x-icon "access plus 1 year"
############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires
ExpiresDefault "access plus 1 year"
ExpiresByType text/html "access plus 1 day"
ExpiresByType text/plain "access plus 1 day"
</IfModule>
<Files "composer.json">
Order Allow,Deny
Deny from all
</Files>
<Files "composer.lock">
Order Allow,Deny
Deny from all
</Files>
<Files "composer.phar">
Order Allow,Deny
Deny from all
</Files>