Skip to content

Commit

Permalink
#
Browse files Browse the repository at this point in the history
  • Loading branch information
schmar00 committed Mar 16, 2024
1 parent 0d3eba0 commit adab7b7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>404</title>
</head>

<body>
<div>
<div id="404page"></div>
</div>

<script>
const voc = 'https://voc.europe-geology.eu';
const regex = /^[a-zA-Z0-9\-_\/]+$/; // allowed only a-z A-Z - _ /
let uri = window.location.href;
let new_path = uri.replace(voc, '');

if (regex.test(new_path)) {
window.location.replace('https://pv.geoinformation.dev?uri=' + voc + new_path);
} else {
document.getElementById('404page').innerHTML = `<h1>404</h1>
<p> <strong>Opps!</strong> Page not found.</p>
<p>${uri}</p>
<p>The page you're looking for doesn't exist.</p>
<a href="index.html">EGDI Vocabularies page</a>`;
}
</script>

</body>

</html>

0 comments on commit adab7b7

Please sign in to comment.