1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| SetEnv REGISTER_GLOBALS 0
SetEnv PHP_VER 5
Options +FollowSymlinks
RewriteEngine on
# REDIRECTION WWW
RewriteCond %{HTTP_HOST} ^xxxxx.com$
RewriteRule ^(.*) http://www.xxxxx.com/$1 [QSA,L,R=301]
# REECRITURE DES MODULES
RewriteRule ^livre-policier/$ index.php?cateogire=POLICE_BOOK [L]
# REDIRECTION ERREUR
ErrorDocument 404 /erreur404.php
ErrorDocument 403 /erreur403.php
# REDICRETION MOBILE
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} "ipod|iphone|ipad|blackberry|android|palm" [NC]
RewriteCond %{HTTP_HOST} !^m\.xxxxx\.com$
RewriteRule ^(.*)$ http://m.xxxxx.com/$1 [R,L]
#PROCTECTION DES IMAGES
RewriteCond %{HTTP_REFERER} !^http://www.xxxxx.com/.*$ [NC]
ReWriteRule .*\.(gif|png|jpe?g)$ - [F]
# MOD_DEFLATE COMPRESSION
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/x-httpd-php
#Pour les navigateurs incompatibles
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
#ne pas mettre en cache si ces fichiers le sont déjà
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
# PROXIES DOIVENT DONNER LE BON CONTENU
Header append Vary User-Agent env=!dont-vary
# EXPIRATION
ExpiresActive On
ExpiresDefault "access plus 7200 seconds"
ExpiresByType text/html "access plus 1 hours"
ExpiresByType text/css "access plus 1 hours"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType image/gif "access plus 5 hours"
ExpiresByType image/png "access plus 5 hours"
# DOSSIER PROTEGE
Options -Indexes
AuthName "Page d'administration protégée"
AuthType Basic
AuthUserFile "/home/xxxxx/www/.htpasswd"
Require valid-user |
Partager