Hello, I’m trying to make an image either show or not show depending on which domain name is in the URL bar. I currently have multiple “micro-sites” hosted on my main domain (techlinkcorp.co.uk) which are accessed via their own separate domains (via forwarding and masking). so what I’d like to happen is on the 404 page, the logo of each separate microsites to show depending on which domain directed them to the 404 page.
I’ve tried using wixWindow.referrer with the following code:
import wixWindow from 'wix-window';
$w.onReady( function() {
if (wixWindow.referrer === "http://www.waleswest.uk/") {
$w('#MainLogo').hide();
$w('#Logo1').show();
$w('#Logo2').hide();
}
else if (wixWindow.referrer === "http://www.tlcradio.co.uk/") {
$w('#MainLogo').hide();
$w('#Logo1').hide();
$w('#Logo2').show();
}
else {
$w('#MainLogo').show();
$w('#Logo1').hide();
$w('#Logo2').hide();
}
})
unfortunately, this does not work as it appears wixWindow.referrer takes the whole URL. Is there a way to make it ignore the path (the bit after the ‘/’)?
Thanks