简体   繁体   English

将Net Nuke移动点重定向到完整站点

[英]Dot Net Nuke Mobile Redirection to Full Site

I have a DNN site that redirects to a mobile version of the site. 我有一个DNN网站,该网站重定向到该网站的移动版本。 I am trying to set a cookie or a session so that when directing off from the mobile version (to desktop version) it wont just loop back to the mobile website every time. 我正在尝试设置Cookie或会话,以便从移动版本(到桌面版本)定向时不会每次都循环回到移动网站。 What file should I be looking in to find where the redirect call is? 我应该在哪个文件中查找重定向调用的位置? (and to add a check or statement to see if came from mobile site already). (并添加支票或对帐单以查看是否已经来自移动网站)。

Thanks! 谢谢!

All you need to do is set a querystring parameter on the redirect to the desktop site of nomo=1. 您需要做的就是在重定向到nomo = 1的桌面站点上设置querystring参数。 This will set 2 cookies, one of which is "disableredirectpresist" which expires after 20mins. 这将设置2个cookie,其中之一是“ disableredirectpresist”,它会在20分钟后失效。 If the user stays on the desktop site, this cookie is refreshed by 20mins to keep user on desktop site. 如果用户停留在桌面站点上,则此Cookie会刷新20分钟以使用户停留在桌面站点上。

So if you have a link on the desktop site that redirects back to mobile, you would want to delete this cookie from your code behind (can't delete from javascript as its a http cookie). 因此,如果您在桌面网站上有一个链接重定向到移动设备,则需要从后面的代码中删除此cookie(不能从javascript中删除它的http cookie)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM