
index index.html index.php;

location / {
    if ($request_uri ~ ^/index(\.html)?$) {
        return 301 /;
    }

    if ($request_uri ~ ^/(.*)\.html$) {
        return 301 /$1;
    }


    try_files $uri $uri/ $uri.html /sites$uri /sites$uri.html /index.php?$query_string;
}