Copy link to clipboard
Copied
Hello, I've not found any info on whether or not this is possible in Business Catalyst.
A site is about to undergo a complete design change and domain name change so all page traffic from the current site is to be redirected to the new site via 301 redirects. This will cause some confusion to people that know the current site, so is it possible to have BC produce a pop-up message to anybody that lands on the new site pages via a 301 redirect?
Grant
Copy link to clipboard
Copied
301 redirects like this in terms of google and the new site and fixing it after Grant will be terrible. With that 301 is permanent redirect and server side so other then on the pages it redirects to having a popup you can not do an auto solution since that element is javascript.
You are better off doing things with liquid/javascript.
Copy link to clipboard
Copied
Hi Liam, thanks for your thoughts.
I'm probably missing soemthing here, but I'm not sure why the redirect being permanent is a problem since the new site will be permanent and we just want the old traffic to find the new site.
I've realised there are a few ways of getting the redirection to work, the redirects could happen from the old site, each page redirecting to the new site (this would be the only way of catching redirects to provide a pop-up message, correct?), or the old domain name can be added to the new site and forwarded to the new new domain name.
Would you mind explaining your approach with Liquid/javascript please?
Thanks for your attention to this!
Copy link to clipboard
Copied
You will have 301 redirects that get logged and indexed, then you will have to remove those redirects (all manual in the admin) and then do them again for the live site.
I can tell you from fixing up this from other people who have done this, It takes a long time if at all to have the new site index properly as a result.
What is a redirect?
Redirects to a page so if this is not a live site why not just have that page with the message etc?
If you are redirecting them to their new pages right away but do not want people to see them then you can do things in liquid like..
IF URL HAS PARAM ?prev=true
show new site
ELSE
show coming soon message
Copy link to clipboard
Copied
Thanks Liam,
Seems that perhaps redirecting old site traffic to a message page on the new site will be the best approach and then after a while close down the old site and add the old domain name to the new site and forward it to the new domain name.
Copy link to clipboard
Copied
Sorry Liam, this part is still not clear to me - if a user arrives on a new site page having been sent there via a 301 redirect from the old site, can BC detect the 301 redirection in any way and then though javascript or liquid display a message to the user? I have seen some articles on Stackoverflow talk about solutions to this problem but it's all been PHP based which isn't much use to me here.
Copy link to clipboard
Copied
It can not detect the 301 redirect from another site. You can see the referrer.
Copy link to clipboard
Copied
Cool, that looks like the bit I need to know. And I have now found this page that talks about it in the documentation, module_referreraddress | Business Catalyst Developers
hopefully I won't need to ask you what to do next ; - )
Cheers!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now