“__cf_mob_redir” cookie how set?

I am trying to implement this “__cf_mob_redir” cookie to avoid mobile redirection of some specific files but so far it doesn’t seem to work. The files get redirected to the mobile subdomain regardless of this cookie. This is my code:

<?php $cookie_name = "__cf_mob_redir"; $cookie_value = "__cf_mob_redir = 0"; $path="/"; $domain=".mydomain.com"; setcookie($cookie_name, $cookie_value, time() + (86400 * 30), $path, $domain); ?>

What am I doing wrong?

2 posts were merged into an existing topic: How to properly implement the “__cf_mob_redir” cookie?

A post was merged into an existing topic: How to properly implement the “__cf_mob_redir” cookie?