fix: remove .html links

This commit is contained in:
2026-01-14 17:12:31 +01:00
parent 33b7d5dffc
commit 080fed1008
7 changed files with 38 additions and 27 deletions

View File

@@ -10,9 +10,20 @@ server {
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# Clean URL rewrites - Map short URLs to actual HTML files
rewrite ^/dns$ /dns-lookup.html last;
rewrite ^/dns-lookup$ /dns-lookup.html last;
rewrite ^/whois$ /whois-lookup.html last;
rewrite ^/whois-lookup$ /whois-lookup.html last;
rewrite ^/mac$ /mac-lookup.html last;
rewrite ^/mac-lookup$ /mac-lookup.html last;
rewrite ^/subnet$ /subnet-calculator.html last;
rewrite ^/subnet-calculator$ /subnet-calculator.html last;
# Statische Dateien direkt ausliefern
location / {
try_files $uri $uri/ /index.html; # Wichtig für Single-Page-Apps (auch wenn wir keine sind)
# First try the exact URI, then with .html, then fall back to index.html
try_files $uri $uri.html $uri/ /index.html;
}
# API-Anfragen an den Backend-Service weiterleiten