Skip to content

Commit

Permalink
remove slash on redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
tsolakoua authored Dec 13, 2023
1 parent 7816549 commit e7706fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
console.log(window.location.hostname);
const path = window.location.pathname;
const redirectPattern = /^\/([^/]+)/;
const redirectUrl = path.replace(redirectPattern, 'https://uat.developers.amadeus.com/self-service/apis-docs/guides/$1/');
const redirectUrl = path.replace(redirectPattern, 'https://uat.developers.amadeus.com/self-service/apis-docs/guides/$1');
document.write(`<meta http-equiv="refresh" content="0;url=${redirectUrl}" />
<link rel="canonical" href="${redirectUrl}" />`);
}
</script>
{% endblock %}
{% endblock %}

0 comments on commit e7706fa

Please sign in to comment.