如何在301重定向用户的新站点上弹出? [英] How to do popup on new site for 301 redirected users?

查看:90
本文介绍了如何在301重定向用户的新站点上弹出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将网站迁移到了新域(采用新设计),并使用.htaccess从旧站点重定向到新站点并重定向301.由于新站点完全不同,因此我担心用户可能会迷失方向.是否有一种方法可以使用户仅在从旧站点重定向后才能在新站点上弹出窗口?一直在搜索此内容,但关键字似乎只会导致弹出窗口重定向到其他网站上的内容.

I have just migrated a site to a new domain (with new design) and am redirecting from the old site to the new with .htaccess and redirect 301. Since the new site is quite different, I'm concerned that users might be disoriented. Is there a way to have a popup on the new site that users get only if they have been redirected from the old site? Have been searching on this but keywords seem to lead only to stuff on popup redirects to another site.

推荐答案

我可以想到几种方法:

  • 在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

这篇关于如何在301重定向用户的新站点上弹出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆