diff --git a/.ci/.autoRedirect b/.ci/.autoRedirect index 0746648bbfdb2c12257719c841b0f6b012ffe576..d18e26b4299d6db22589b472e85bd92454cbb46d 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