• Like so many others I seem to be having an issue with the Redirect To Full Site.

    I am certain that this has worked in the past and am wondering if the plugin is not compatible with the latest version of WordPress.

    I have the cookie all set up on the mobile site, set correctly and when checking using a variety of tool can see that it is there. The domain is all configured correctly on the cookie. But the redirect is now failing.

    Regards

    Mark

    https://www.ads-software.com/plugins/php-mobile-redirect/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter silentravendesign

    (@silentravendesign)

    Nothing like answering your own question is there!!

    As there was no response I decided to do some digging and it looks as though leaving the ‘Cookie Name’ blank (as it apparently defaults to ‘mobile’) is no longer good enough.

    I set the ‘Cookie Name’ to be ‘mobile’ and saved the settings and all worked.

    Basically:

    Settings > PHP Redirect > Cookie Name > Set to ‘mobile’

    I ended up finding out that the mobile site we were trying to pass the cookie from was an HTML file, not PHP. We ended up creating a quick JavaScript snippet of code and it works perfect now.

    Just insert this code into the header of the mobile page:

    <script type="text/javascript">
    var now = new Date();
    var time = now.getTime();
    time += 3600 * 1000;
    now.setTime(time);
    document.cookie="mobile=m; expires=" + now.toUTCString() + "; domain=.yourdomain.com; path=/";
    </script>
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redirect To Full Site not working’ is closed to new replies.