X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=htdocs%2F.htaccess.in;h=281f39f129bed3b032f194b5202830b866199fdf;hb=e153e57a59576be2652bb4dd49d3668757a219ae;hp=464189b902cf9251f9e5265fc1b5b92f13f824a6;hpb=b6cdf7b450a26a7fb5027d23569b15def0abd812;p=platal.git diff --git a/htdocs/.htaccess.in b/htdocs/.htaccess.in index 464189b..281f39f 100644 --- a/htdocs/.htaccess.in +++ b/htdocs/.htaccess.in @@ -1,9 +1,28 @@ -Options +FollowSymLinks RewriteEngine on RewriteBase @REWRITE_BASE@ -# Rewrite URLs of the form 'index.php?q=x': +# Rewrites static files from embedded/raw|light +RewriteCond %{DOCUMENT_ROOT}/$2 -f +RewriteRule ^(embedded/[^/]+/)(.*)$ $2 [L] + +# Rewrites URLs of the form 'index.php?q=x'. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ?n=$1 [L,QSA] + +# Caches the immutable resources for seven days. Generated files (images and JS +# served by PHP) are not affected. +ExpiresActive On +ExpiresByType application/javascript "access plus 7 days" +ExpiresByType application/x-javascript "access plus 7 days" +ExpiresByType image/gif "access plus 7 days" +ExpiresByType image/jpeg "access plus 7 days" +ExpiresByType image/png "access plus 7 days" +ExpiresByType text/css "access plus 7 days" + +AddOutputFilterByType DEFLATE application/javascript +AddOutputFilterByType DEFLATE application/x-javascript +AddOutputFilterByType DEFLATE text/css +AddOutputFilterByType DEFLATE text/html +AddOutputFilterByType DEFLATE text/xml