gregoiredierendonck/Labo3G/master/source/.htaccess - Htaccess File

gregoiredierendonck/Labo3G/master/source/.htaccess

<IfModule mod_rewrite.c>
   # Enable URL rewriting
   Options +FollowSymlinks
   RewriteEngine On
   RewriteCond %{REQUEST_URI} ^(.*).html$
   RewriteRule ^.*.html$ %1.php [L]
   RewriteCond %{HTTP_HOST} ^labo3g.fr$ [OR]
   RewriteCond %{HTTP_HOST} ^www.labo3g.fr$
</IfModule>

# Redirection to 404
   ErrorDocument 404 http://www.labo3g.fr/404.html

# Gzip compression
   <ifmodule mod_deflate.c>
   AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript image/svg+xml
   </ifmodule>

   # Cache control
   # 480 weeks
   <FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf|svg)$">
   Header set Cache-Control "max-age=290304000, public"
   </FilesMatch>
   # 2 DAYS
   <FilesMatch ".(xml|txt)$">
   Header set Cache-Control "max-age=172800, public, must-revalidate"
   </FilesMatch>
   # 2 HOURS
   <FilesMatch ".(html|htm)$">
   Header set Cache-Control "max-age=7200, must-revalidate"
   </FilesMatch>

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_HOST, REQUEST_URI

Comments

Apache