1

On my web site we have activated the mobile redirect from cloudflare.

Now we want the access to full site on mobile device.

From cloudflare support we found "__cf_mob_redir = 0; domain=.example.com" for disable the mobile redirect (m.) but i dont know how to implement this cookie parameter to a real html link (for Desktop site link ) / php function (get ?) for the cokkie and redirect to the desktop page (www.).

Thanks in advance ... cookie is my nightmare.

Manuel S.
  • 33
  • 5

1 Answers1

0

I think the answer in Set cookie (with JS) for whole domain not specific page should help with structuring your cookie:

Example from that page:

function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+d.toUTCString();
document.cookie = cname + "=" + cvalue + "; " + expires + "; path=/";
}

"You can specifiy domain ;domain=.example.com as well as path ;path=/ ("/" set cookie in whole domain)"

Community
  • 1
  • 1
Gareth
  • 31
  • 1