40 lines
1.7 KiB
ApacheConf
40 lines
1.7 KiB
ApacheConf
RewriteEngine On
|
|
|
|
# --- 1) Redirections spécifiques (PLACÉES AVANT le canonical) ---
|
|
Redirect 301 /faq.html https://pasteuravocate.com/faq
|
|
Redirect 301 /contact.html https://pasteuravocate.com/contact
|
|
Redirect 301 /mentions.html https://pasteuravocate.com/mentions
|
|
Redirect 301 /honoraires.html https://pasteuravocate.com/honoraires
|
|
Redirect 301 /assistance-educative.html https://pasteuravocate.com/assistance-educative
|
|
Redirect 301 /droit-penal-mineur.html https://pasteuravocate.com/droit-penal-mineur
|
|
Redirect 301 /droit-etrangers.html https://pasteuravocate.com/droit-etrangers
|
|
Redirect 301 /droit-education.html https://pasteuravocate.com/droit-education
|
|
|
|
# --- 2) Canonical : HTTPS + non-www (conserve le chemin + query) ---
|
|
RewriteCond %{HTTPS} !=on [OR]
|
|
RewriteCond %{HTTP_HOST} ^www\.pasteuravocate\.com$ [NC]
|
|
RewriteRule ^ https://pasteuravocate.com%{REQUEST_URI} [L,R=301]
|
|
|
|
# --- 3) Cache navigateur (images + CSS/JS) ---
|
|
<IfModule mod_expires.c>
|
|
ExpiresActive On
|
|
ExpiresByType image/webp "access plus 6 months"
|
|
ExpiresByType image/png "access plus 6 months"
|
|
ExpiresByType image/jpeg "access plus 6 months"
|
|
ExpiresByType image/gif "access plus 6 months"
|
|
ExpiresByType image/svg+xml "access plus 6 months"
|
|
ExpiresByType image/x-icon "access plus 1 year"
|
|
ExpiresByType text/css "access plus 1 month"
|
|
ExpiresByType application/javascript "access plus 1 month"
|
|
</IfModule>
|
|
|
|
<IfModule mod_headers.c>
|
|
<FilesMatch "\.(webp|png|jpe?g|gif|svg|ico)$">
|
|
Header set Cache-Control "public, max-age=15552000, immutable"
|
|
</FilesMatch>
|
|
<FilesMatch "\.(css|js)$">
|
|
Header set Cache-Control "public, max-age=2592000"
|
|
</FilesMatch>
|
|
</IfModule>
|
|
|