diff --git a/404.html b/404.html index 737232c..3d13931 100644 --- a/404.html +++ b/404.html @@ -13,12 +13,20 @@ document.open(); document.write(xhr.responseText); document.close(); + fixRelativePaths(); } }; xhr.send(); } - //Preserve the original path, query string, and hash + // Function to fix relative paths for assets + function fixRelativePaths() { + var base = document.createElement('base'); + base.href = '/'; + document.head.appendChild(base); + } + + // Preserve the original path, query string, and hash var path = window.location.pathname; var query = window.location.search; var hash = window.location.hash; diff --git a/CNAME b/CNAME deleted file mode 100644 index 40cb7f3..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -davidhomyk.com \ No newline at end of file