Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
Locked
0

301 redirect - is it possible to have a pop up message appear once redirected?

Explorer ,
Sep 08, 2016 Sep 08, 2016

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

2.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 08, 2016 Sep 08, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 11, 2016 Sep 11, 2016

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 11, 2016 Sep 11, 2016

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 11, 2016 Sep 11, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 11, 2016 Sep 11, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 11, 2016 Sep 11, 2016

It can not detect the 301 redirect from another site. You can see the referrer.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 11, 2016 Sep 11, 2016
LATEST

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines