diff --git a/nginx.conf b/nginx.conf index cec7690..64575b6 100644 --- a/nginx.conf +++ b/nginx.conf @@ -11,8 +11,9 @@ http { location / { root /usr/share/nginx/html; index index.html index.htm; - # This line forces Nginx to pass routing back to React Router - try_files $uri $uri/ /index.html; + # Next.js static export creates page.html (e.g. contact.html) for routes. + # We check $uri.html to allow clean URLs without the .html extension. + try_files $uri $uri.html $uri/ /404.html; } } }