]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/piedsjaloux/production.nix
Redirect websites landing pages
[perso/Immae/Config/Nix.git] / modules / private / websites / piedsjaloux / production.nix
index 28f85eb180474318204000dc6e4004bd00dd1876..e4e29c710d29f2ce242088e8f99ffca17dfeea04 100644 (file)
@@ -74,6 +74,10 @@ in {
       root         = pcfg.webappDirs.piedsjaloux_prod;
       extraConfig  = [
         ''
+        RewriteEngine on
+        RewriteCond "%{HTTP_HOST}" "!^www.piedsjaloux\.fr$" [NC]
+        RewriteRule ^(.+)$ https://www.piedsjaloux.fr$1 [R=302,L]
+
         <FilesMatch "\.php$">
           SetHandler "proxy:unix:${pcfg.phpListenPaths.piedsjaloux_prod}|fcgi://localhost"
         </FilesMatch>