location ~ ^(?<canonical>.*)\.html$ { access_log off; log_not_found off; http2_push $canonical; return 301 $canonical; }