Merge remote branch 'origin/platal-1.0.1'
[platal.git] / htdocs / .htaccess.in
index 464189b..af51870 100644 (file)
@@ -1,9 +1,18 @@
-Options +FollowSymLinks
 RewriteEngine on
 
 RewriteBase @REWRITE_BASE@
 
-# Rewrite URLs of the form 'index.php?q=x':
+# 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"