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
| Options +FollowSymlinks
Options -Indexes
<IfModule mod_headers.c>
Header set Strict-Transport-Security "max-age=16006000; includeSubDomains; preload"
</IfModule>
Header always set Content-Security-Policy "upgrade-insecure-requests;"
<IfModule mod_rewrite.c>
# Rewrite the URL to force https and www.
RewriteEngine On
# Compliant with hstspreload.org : first redirect to https if needed
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# then redirect to www. when the prefix wasn't mentionned
# hstspreload.org seems to not really like to make the two at once
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{QUERY_STRING} ^id_evenement=[0-9]{1,3}$
ErrorDocument 404 /index.php
</IfModule>
RewriteRule ^theme/([0-9]+)/ /agenda/search.php?mode=theme&id=$1 [L]
RewriteRule ^region/([0-9]+)/ /agenda/search.php?mode=region&id=$1 [L] |
Partager