.htaccess 1.42 KB
Newer Older
Julien Jorry committed
1
<IfModule mod_rewrite.c>
2
    Options -MultiViews
3

Julien Jorry committed
4
    RewriteEngine On
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

    # Https redirection
    RewriteEngine on
    RewriteCond %{HTTPS} !=on
    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    # Https redirection for OVH
    RewriteEngine on
    RewriteCond %{SERVER_PORT} 80
    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    # Https redirection for Gandi
    RewriteEngine on
    RewriteCond %{REQUEST_SCHEME} =http
    RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

21 22
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php [QSA,L]
Julien Jorry committed
23 24 25 26
</IfModule>

<IfModule !mod_rewrite.c>
    <IfModule mod_alias.c>
27
        RedirectMatch 302 ^/$ /index.php/
Julien Jorry committed
28
    </IfModule>
29 30 31
</IfModule>
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE "application/atom+xml" "application/javascript" "application/json" "application/ld+json" "application/manifest+json" "application/rdf+xml" "application/rss+xml" "application/schema+json" "application/vnd.geo+json" "application/vnd.ms-fontobject" "application/x-font-ttf" "application/x-javascript" "application/x-web-app-manifest+json" "application/xhtml+xml" "application/xml" "font/eot" "font/opentype" "image/bmp" "image/svg+xml" "image/vnd.microsoft.icon" "image/x-icon" "text/cache-manifest" "text/css" "text/html" "text/javascript" "text/plain" "text/vcard" "text/vnd.rim.location.xloc" "text/vtt" "text/x-component" "text/x-cross-domain-policy" "text/xml"