mirror of
https://github.com/MrUnknownDE/utools.git
synced 2026-04-18 21:53:44 +02:00
fix: remove .html links
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user