Skip to content

Commit

Permalink
fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
MinjiK committed Dec 18, 2023
1 parent 8825236 commit 2f9fd02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

{% extends "base.html" %}
{% block extrahead %}

<script>
{ { super() } }
if (window.location.hostname === 'amadeus4dev.github.io') {
console.log('first script');
const path = window.location.pathname;
const redirectPattern = /^\/([^/]+)/;
const redirectUrl = path.replace(redirectPattern, 'https://developers.amadeus.com/self-service/apis-docs/guides/$1');
document.write(`<meta http-equiv="refresh" content="0;url=${redirectUrl}" />`);
}
{ { super() } }
</script>
{% endblock %}

Expand Down

0 comments on commit 2f9fd02

Please sign in to comment.