且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在301重定向用户的新站点上弹出?

更新时间:2023-10-21 15:41:22

我可以想到几种方法:

  • 在301中重定向到另一页(www.blah.com/tour而不是www.blah.com),在那里我将显示弹出框的逻辑

  • Redirect in the 301 to another page (www.blah.com/tour instead of www.blah.com) and there i would put the logic to show the popup

在301中重定向到另一个页面,并在其中设置一个cookie并重定向到原始页面.然后,将逻辑添加到原始页面以显示弹出窗口(如果存在cookie的话)(并删除co​​okie)

Redirect in the 301 to another page and there set a cookie and redirect to the original page. Then, add logic to the original page to show the popup if the cookie is present (and delete the cookie)

在新站点中检查引荐来源网址,如果它与旧站点匹配,则显示弹出窗口

Check the referrer in the new site and if it matches the old one, show the popup