Skip to content
Snippets Groups Projects
dev.conf 553 B
Newer Older
server {
  listen 8080 default_server;

  root /usr/share/nginx/html/;

  location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    try_files $uri $uri/ /index.html;
    sub_filter '<html lang="en">' '<html lang="fr">';
  }

      # Rule serving the en build
    location /en {
        try_files $uri$args /en/index.html;
    }

    # redirecting the /fr url to the new location of the fr build
    location ~ ^/fr(.*)$ {
        return 301 $scheme://$http_host$1$is_args$args;
    }

}