# @version $Id: htaccess.txt 13415 2009-11-03 15:53:25Z ian $ SetEnv PHP_VER 7_0 SetEnv REGISTER_GLOBALS 0 SetEnv ZEND_OPTIMIZER 1 SetEnv MAGIC_QUOTES 0 RewriteEngine On # RewriteRule ^([^\.]+)\.html /index.php?page=$1 [L] # AddType application/x-httpd-php5 .php ## Mise en cache Mad ### Caching mod_headers + mod_expires # Turn on Expires and set default to now ExpiresActive On ExpiresDefault "now" # Set up caching on media files for 1 month ExpiresDefault "access plus 1 month" # Set up caching on images, CSS and JS files for 1 week ExpiresDefault "access plus 1 week" # Set up 1 hour caching on commonly updated files # ExpiresDefault "access plus 1 hour" # Force no caching for dynamic files ExpiresActive Off # Remote ETag from headers Header unset ETag # Disable ETag for files FileETag None # Media files are catchable Header append Cache-Control "public" # Images, css and javascript files are catchable Header append Cache-Control "public" # Commonly updated files are catchable # Header append Cache-Control "public" # Force no caching for dynamic files Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform" Header set Pragma "no-cache" ## ajout avec la version 3.9.21 Header always set Content-Security-Policy "script-src 'none'" ## 030621 ajout Header always set Strict-Transport-Security "max-age=31536000" env=HTTPS Header always append X-Frame-Options SAMEORIGIN # The `X-Frame-Options` response header should be send only for # HTML documents and not for the other resources. Header unset X-Frame-Options Header set X-Content-Type-Options "nosniff" Header always set Referrer-Policy "no-referrer-when-downgrade" # @package Joomla # @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. # @license http://www.gnu.org/copyleft/gpl.html GNU/GPL # Joomla! is Free Software ## ##################################################### # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE # # The line just below this section: 'Options +FollowSymLinks' may cause problems # with some server configurations. It is required for use of mod_rewrite, but may already # be set by your server administrator in a way that dissallows changing it in # your .htaccess file. If using it causes your server to error out, comment it out (add # to # beginning of line), reload your site in your browser and test your sef url's. If they work, # it has been set by your server administrator and you do not need it set here. # ##################################################### ## Can be commented out if causes errors, see notes above. ##Options +FollowSymLinks # ajout suite MaJ Joomla 3.9.3 Header always set X-Content-Type-Options "nosniff" # # mod_rewrite in use RewriteEngine On ########## Begin - Rewrite rules to block out some common exploits ## If you experience problems on your site block out the operations listed below ## This attempts to block the most common type of exploit `attempts` to Joomla! # ## Deny access to extension xml files (uncomment out to activate) ## Modifications du 15.12.2010 par Mahdi (lignes de 38 à 42 décommentées) Order allow,deny # Deny from all # Satisfy all # Autoriser consultation sitemap.xml order deny,allow allow from all ## End of deny access to extension xml files RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR] # Block out any script trying to base64_encode crap to send via URL RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR] # Block out any script that includes a