From e64f1651fa7bd1d2016e8a88d44171f0dae926d3 Mon Sep 17 00:00:00 2001 From: laurentheirendt <laurent.heirendt@uni.lu> Date: Mon, 28 Oct 2019 17:36:43 +0100 Subject: [PATCH] change to redirect entire path Former-commit-id: 7a3f9869258c48d6a13fe940094641adc6f465e7 --- .ci/.autoRedirect | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.ci/.autoRedirect b/.ci/.autoRedirect index 0746648b..d18e26b4 100644 --- a/.ci/.autoRedirect +++ b/.ci/.autoRedirect @@ -15,8 +15,15 @@ }); } UrlExists('https://r3-core.pages.uni.lu/howto-cards-internal/index.html', function(status){ - var pathArray = window.location.pathname.split('/'); - var sub = pathArray[1]; + var s = window.location.pathname; + var pathArray = s.split('/'); + + // cut the entire subdomain path + if (pathArray[0].length > 0) { + sub = s.substr(pathArray[0].length+1); + } else { + sub = ''; + } if(status === 200){ // internal pages -- GitLab