-
Notifications
You must be signed in to change notification settings - Fork 16
/
.htaccess
30 lines (26 loc) · 970 Bytes
/
.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
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L,QSA]
# redirect Authorization to $_SERVER
#RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization},last]
</IfModule>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_headers.c>
# Cross domain access for API
#Header add Access-Control-Allow-Origin "*"
#Header add Access-Control-Allow-Headers "origin, Authorization, x-requested-with, content-type"
#Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
Header set X-XSS-Protection "1; mode=block"
Header append X-FRAME-OPTIONS "SAMEORIGIN"
# cache 1 week
<filesMatch ".(jpg|jpeg|png|gif|ico)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
<filesMatch ".(css|js|ttf|woff|svg|eot)$">
Header set Cache-Control "max-age=604800, public"
</filesMatch>
</IfModule>