diff --git a/frontend/app/dns-lookup.html b/frontend/app/dns-lookup.html
index 24b5b5c..c3e3bfe 100644
--- a/frontend/app/dns-lookup.html
+++ b/frontend/app/dns-lookup.html
@@ -181,11 +181,11 @@
Suite
diff --git a/frontend/app/index.html b/frontend/app/index.html
index eace1aa..d912941 100644
--- a/frontend/app/index.html
+++ b/frontend/app/index.html
@@ -301,11 +301,11 @@
Suite
diff --git a/frontend/app/mac-lookup.html b/frontend/app/mac-lookup.html
index 101907f..d73d6ca 100644
--- a/frontend/app/mac-lookup.html
+++ b/frontend/app/mac-lookup.html
@@ -182,11 +182,11 @@
Suite
diff --git a/frontend/app/script.js b/frontend/app/script.js
index 3a131e1..0cccee9 100644
--- a/frontend/app/script.js
+++ b/frontend/app/script.js
@@ -785,7 +785,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (currentIp) {
console.log(`User IP link clicked: ${currentIp}. Redirecting to WHOIS lookup...`);
// Leite zur Whois-Seite weiter und übergebe die IP als 'query'-Parameter
- window.location.href = `whois-lookup.html?query=${encodeURIComponent(currentIp)}`;
+ window.location.href = `/whois?query=${encodeURIComponent(currentIp)}`;
} else {
console.warn('Cannot redirect to WHOIS: current IP is not available.');
}
diff --git a/frontend/app/subnet-calculator.html b/frontend/app/subnet-calculator.html
index 12ff0d0..71d595a 100644
--- a/frontend/app/subnet-calculator.html
+++ b/frontend/app/subnet-calculator.html
@@ -165,11 +165,11 @@
Suite
diff --git a/frontend/app/whois-lookup.html b/frontend/app/whois-lookup.html
index b649891..b38ecb8 100644
--- a/frontend/app/whois-lookup.html
+++ b/frontend/app/whois-lookup.html
@@ -181,11 +181,11 @@
Suite
diff --git a/frontend/nginx.conf b/frontend/nginx.conf
index 86d8389..a5b8860 100644
--- a/frontend/nginx.conf
+++ b/frontend/nginx.conf
@@ -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