forked from seafoox/AlerteLeboncoin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
45 lines (36 loc) · 1.31 KB
/
.htaccess
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
##################################
### Interdiction des indexions ###
##################################
Options -Indexes
#########################
### MOD EXPIRE ###
#########################
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
FileETag None
<IfModule mod_expires.c>
# mise en cache des fichiers CSS et JavaScript
ExpiresActive on
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
#ExpiresByType application/rss+xml "access plus 5 minute"
</IfModule>
#########################
### COMPRESSION GZIP ###
#########################
AddOutputFilterByType DEFLATE application/javascript application/x-javascript text/css text/html application/rss+xml
RewriteEngine On
RewriteRule ^index\.php/(.+) /$1 [L,R=301]
# redirection des ressources pour gestion du cache
RewriteRule ^css/[.0-9]+/(.*)$ www/css/$1 [L]
RewriteRule ^js/[.0-9]+/(.*)$ www/js/$1 [L]
RewriteRule ^images/(.*)$ www/images/$1 [L]
# ne redirige pas les dossiers et fichiers symboliques
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .* - [NC,L]
RewriteRule .* index.php [NC,L]