diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2014-03-05 16:56:45 -0500 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2014-03-05 16:56:45 -0500 |
commit | 3a2f43e8d5c85a116845c360902f268fd2798ffa (patch) | |
tree | 3fb05200422ac1a544d2cd93f938b8408e21e53d /www/.htaccess | |
parent | 7b49a8bed0a6c8e50adba8fc6c53c39d330bfa0c (diff) | |
download | html5ks-3a2f43e8d5c85a116845c360902f268fd2798ffa.tar.xz html5ks-3a2f43e8d5c85a116845c360902f268fd2798ffa.zip |
add (untested) php and htaccess
Diffstat (limited to 'www/.htaccess')
-rw-r--r-- | www/.htaccess | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/www/.htaccess b/www/.htaccess new file mode 100644 index 0000000..b51816a --- /dev/null +++ b/www/.htaccess @@ -0,0 +1,25 @@ +<IfModule mod_expires.c> + ExpiresActive on + ExpiresDefault "access plus 1 minutes" + <Location "^/(dump|json)/"> + ExpiresDefault "access plus 1 years" + <Location "^/dump/(bgm|sfx)"> + Header set X-Content-Duration "0" + </Location> + </Location> +</IfModule> + +<IfModule mod_rewrite.c> + RewriteEngine On + RewriteCond %{HTTP:Accept-Encoding} gzip + RewriteCond %{REQUEST_FILENAME}\.gz -s + RewriteRule ^(.*)\.json $1\.json\.gz [QSA] + +# Prevent double gzip and give the correct mime-type + RewriteRule \.json\.gz$ - [T=application/json,E=no-gzip:1,E=FORCE_GZIP] + + Header set Content-Encoding gzip env=FORCE_GZIP +</IfModule> + +Header set Cache-Control "public" +Header set X-UA-Compatible "IE=edge,chrome=1" |