
##
# @package    Joomla
# @copyright  2015 Open Source Matters. All rights reserved.
# @adaptation POUR HEBERGEMENT 1&1
# @license    GNU General Public License version 2 or later; see LICENSE.txt
##

IndexIgnore *
Options +FollowSymlinks
Options -Indexes

AddHandler x-mapp-php5.5  .php 

<FilesMatch "\.(js|css)$">
  <IfModule mod_expires.c>
    ExpiresActive on
    ExpiresDefault "access plus 7 days"
  </IfModule>
  FileETag MTime Size
</FilesMatch>


<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule .* index.php [F]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

#RewriteRule .* index.php [L]

# 1&1 Hack
RewriteRule !index\.php - [C]
RewriteRule ^ /index.php

</IfModule>

IndexIgnore *
DirectoryIndex index.php

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>

AddType application/x-font-woff .woff
AddType application/vnd.ms-fontobject .eot
AddType text/css .css

<IfModule mod_expires.c>
  Header set cache-control: public
  ExpiresActive on
  ExpiresByType font/ttf "access plus 1 year"
  ExpiresByType application/x-font-woff "access plus 1 year"
  ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
  ExpiresByType image/svg+xml "access plus 1 year"
  ExpiresByType image/png "access plus 1 year"
</IfModule>

<IfModule mod_deflate.c>
# pas besoin de compresser en GZIP les fichiers woff, c'est dj fait par defaut
AddOutputFilterByType DEFLATE text/html text/plain text/xml
AddOutputFilterByType DEFLATE text/javascript text/css application/javascript
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
</IfModule>

# Ajouter vos propres regles.
# ...

#RewriteEngine On
#RewriteCond %{HTTP_HOST} ^votresite\.fr$ [NC]
#RewriteRule ^(.*)$ http://www.votresite.fr/$1 [R=301,L]

#RewriteEngine On
#RewriteCond %{HTTP_HOST} !^www.votresite.fr
#RewriteRule ^(.*)$ http://www.votresite.fr$1 [L,R=301]
