forked from h5bp/html5please-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
41 lines (29 loc) · 1.18 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
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+?)\.(html|js|json|xml)$ handler.php?features=$1&format=$2 [NC,QSA]
<IfModule mod_expires.c>
ExpiresActive on
# Default for all files
ExpiresDefault "access plus 1 day"
ExpiresByType text/html "access plus 1 day"
# Data
ExpiresByType text/xml "access plus 1 day"
ExpiresByType application/xml "access plus 1 day"
ExpiresByType application/json "access plus 1 day"
# Media: images
ExpiresByType image/png "access plus 1 month"
# CSS and JavaScript
ExpiresByType text/css "access plus 1 day"
ExpiresByType application/javascript "access plus 1 day"
</IfModule>
# ----------------------------------------------------------------------
# Cross-domain AJAX requests
# ----------------------------------------------------------------------
#
# Serve cross-domain Ajax requests, disabled by default.
# enable-cors.org
# code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>