Just after installing php redirect and con figuring it to the mobile page which is just another page in the same blog. I am facing infinite redirects. In every URL. Even https://www.sitenam.com/wp-admin Unable to access dashboard now.
]]>So I installed your plug in, to redirect mobile users, and it does that, plus it redirects desktop users to the mobile site. I cannot access desktop site from my PC now. I cannot get into wp admin to undo the changes, and Idk what file this plug in accesses so I can delete the code. Can someone please advise?
]]>Hello –
I’d like to send out an eblast and have links within the email always send the user to the full site. Is there a way to format a URL string to override the mobile detection and send the user to the full site?
Best,
]]>The other support tickets on the forum didn’t seem to help me with trying to allow users to “view desktop site”.
I’ve installed and setup the plugin to redirect, left ‘mobile’ as the cookie name and put the URL of the mobile site (minus http) in that box. But when I click the “View Desktop Site” it just sends me back to the mobile site. Here’s the code I have in place, I’ve changed the URL for privacy.
In my mobile site I have this at the very top, before anything else in index.php:
<?php
setcookie("mobile","m", time()+3600, "/",".website.com");
?>
And then in my footer where they can click to view the Full site, I have this:
<p class="footer"><a href="https://website.com/" title="mobile" rel="external">View Full/Desktop Site</a></p>
Am I missing some other code or is this incorrect?
]]>I am trying to redirect my front page for mobile users.
my pc users see one page and my mobile users see a different one.
I have already done this part to the function folder of the plugin
but now it isnt detection mobile devices
replace
add_action(‘init’, ‘pmr_mobile_redirect’);
with
function pmr_single_page_only(){
if (is_page(42)){
pmr_mobile_redirect();
}
}
add_action(‘get_header’,’pmr_single_page_only’);
]]>I need to exclude a page from the mobile redirect. I have a email newsletter that links to articles on a blog. However the url from the email is intercepted by the mobile redirect when visiting the website.
can I either 1.)
Add an exception with a “mysite.com/?mobile-redirect=false” or something? I don’t see that documented.
or 2.)
Add a function to the plugin so the redirect only works on the home page by page ID” or alternately, just exclude my blog page from the plugin re-direct by page name or ID?
]]>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
]]>I would like to put an exeception for a page (neswletter) becouse i need to keep access to my subscrib page of my newsletter
how can i do?
Hi,
This plugin perfectly suits my needs. Though I’m having an issue with PHP Mobile Redirect in combination with WP Super Cache.
The homepage (https://gregorius.nl/) redirects on mobile now to https://gregorius.nl/mobile. But when I turn on WP Super Cache the homepage redirects on mobile to the normal homepage.
For now I have disabled the caching of the homepage inside WP Super Cache using “Accepted Filenames & Rejected URIs” and selected “Front Page (is_front_page)”.
But is there a workaround so I can use WP Super Cache and PHP Mobile Redirect both to the fullest?
HI php mobile redirect
I believe this plugin works, but I couldnt redirect to my mobile site on my mobile phone. I guess it is something I did in the settings. My mobile site url is: m.artyconnections.sg. I couldnt include the www. because that web page doesnt exist. Please advice. Thank you.
Shu Hui
]]>Although I can see it’s not actively supported anymore I hope this message gets read ??
Same problem like many of you. Redirection smartphone users to the mobile website works just fine. Viewing the desktop version from the mobile website isn’t working. The link has been added correctly but I guess it’s redirecting back to the mobile website again.
I’ve done the following:
1. Included the mobile URL testpage.mydomainname.com in the settings page and enabled the redirect.
I didn’t fill in the cookie name as it sets it to mobile.
2. I’ve added <?php
setcookie(“mobile”,”m”, time()+3600, “/”, “.testpage.mydomainname.com”);
?> to the very first line of my index.php
3. Include a link to the full website
<p>Full website</p>
Am I missing something here? Anyone with a solution please?
Any help is highly appreciated.
Cheers!
https://www.ads-software.com/support/plugin/php-mobile-redirect
]]>I see you have it where we can set a cookie using php, is there a way to do that by JS. Since the mobile site is plain HTML and JS, no PHP.
Thanks.
]]>Hi,
How does the back to main site work? does it contain any website or something?
It forwards to my mobile website but not seeing any link back to main site
]]>Hello, I was curious of the method you use for redirecting mobile traffic. For example, do you use a database that is constantly updated?
Thanks!
]]>I’d love if this plugin were able to have a check box on pages to enable/disable mobile redirect. I’m working on a realtor’s website: https://lindakilroy.com. Their system for displaying listings, IDX, isn’t mobile responsive in the widgets, and their theme, AgentPress by StudioPress is also not mobile responsive. However, their IDX does have a mobile option for searching: https://app.dsmobileidx.com/82381/20/.
I want all posts, and a custom post type (Listings) to just show as they should (using JetPack for mobile responsive to it’s ability) and then selectively make some of the pages redirect to the mobileidx link above while others not redirect. However, that’s about 40 pages to manually code into the parameters of the plugin functions.php. I hesitate to change functions.php, though I know how…. because of the impending auto-updates approach we are taking from 3.7 forward. suggestions?
]]>Is it possible to show the desktop version on iPad?
]]>I wasn’t able to get this to work off the bat. I realized that you are redirecting someone on the ‘init’ action, which is before you would ever get to the page where the cookie was being set to stop the redirect, so it would just never get to the point where that cookie was set. I had to update the plugin functions.php to this:
//add_action('init', 'pmr_mobile_redirect');
function redirect_without_infinite_loop(){
// --- Added by Brian because if we don't do this it will endlessly loop
if(!is_page('mobile')){
pmr_mobile_redirect();
}
}
add_action('get_header','redirect_without_infinite_loop');
function pmr_mobile_redirect(){
global $pmr_options;
if ($pmr_options['enabled'] == true)
{
$detect = new Mobile_Detect();
if ($detect->isMobile() && isset($_COOKIE[$pmr_options['mobile_cookie']]))
{
$detect = "false";
}
elseif ($detect->isTablet() && $pmr_options['tablet'] == true)
{
$detect = "false";
}
elseif ($detect->isMobile())
{
header('Location: https://' . $pmr_options['mobile_url']);
exit;
}
}
}
‘mobile’ is the slug of my mobile page, other users would have to update their code to correctly identify their mobile page. This way, if users arethere it won’t keep redirecting them. I’m surprised in your code there is not already something to prevent this behavior. Is there any way I can get this to work without my adjustments to your code?
]]>So I am having problems where the plugin directs perfectly to the mobile site. Which is an external html website, but the redirect back to the full site does not work.
The full wordpress website is: https://www.t4run.co.uk
and the mobile html website is: m.t4run.co.uk
I then converted the index.html to index.php (just renaming the document, is that okay to do?) and then added this code to the top before any html code as I heard you have to have an index.php page, am i correct?:
<?php
setcookie("mobile","m", time()+3600, "/", ".t4run.co.uk");
?>
I then added this code to the footer so the user can go back to the full site.
<div><a href="https://www.t4run.co.uk/" title="mobile" target="_blank" rel="external"><p1>
View Full Site</p1>
</a></div>
Even when the user clicks the link i get an endless loop of going back to the mobile site (m.t4run.co.uk) and never goes to the full site.
Please someone tell me if I am doing something majorly wrong or any advice would be grateful.
Thank you
]]>Hi there,
First of all, let us thank you for coding this plugin. It works perfectly. We are using it to just redirect the landing page due to heavy load.
We enabled “Exclude Tablets From Redirect:”. It works perfectly with all iOS devices (iPad, iPad2, iPad3, Mini).
We do not have the cookies-option enabled.
However, exclusion does not work on Android. Tested on:
Kindle Fire2, Nexus7, Galaxy Tab2.
Also, how can we exclude iPhone 4&5? Any mod available for the mobile_detect.php?
We cannot provide a live URL due to beta-Status.
All the best and thanks again for this amazing work,
]]>Is it possible to mask the URL that you are re-directing to?
https://www.ads-software.com/extend/plugins/php-mobile-redirect/
]]>Hi,
Like many others, I’m trying to have a link that redirects to my desktop version.
My urls:
desktop: https://109.70.3.148/~scheuten/
mobile: https://109.70.3.148/~scheuten/m/
So this is what I did:
I included inside my mobile theme’s index.php file at the very top the following sentence:
<?php
setcookie(“mobile”,”m”, time()+3600, “/”, “.109.70.3.148/~scheuten/”);
?>
My website is on a test server, that’s why it’s an IP number.
The cookie name I entered in your plugin on my desktop version is ‘mobile’ (without the ”). That should do the trick right?
When I look at the source code of my mobile theme, I don’t see the code for redirecting back go my desktop version. Is this normal?
It redirects fine from my desktop version to the mobile, so that’s nice!
https://www.ads-software.com/extend/plugins/php-mobile-redirect/
[No bumping, thank you.]
]]>I have only a handful of pages on my site that I’d like to have a mobile counterpart to. Otherwise, the rest of my site is fine. Can I use this plugin on certain pages to redirect to other certain pages? For instance:
https://www.ads-software.com/extend/plugins/php-mobile-redirect/
]]>Placed the code and even looked at some of these support tickets, I’ve done everything right from what I can tell. The cookie name is mobile.
Here is what I placed before any HTML on my mobile index.php page:
<?php
setcookie("mobile","m", time()+3600, "/");
?>
https://lauruscollege.edu/mobile is the page.
Any ideas?
https://www.ads-software.com/extend/plugins/php-mobile-redirect/
]]>Whenever I active the plugin, mobile browsers get send into an endless redirect loop.
How to fix this?
https://www.ads-software.com/extend/plugins/php-mobile-redirect/
]]>First of all, I want commend a good excellent well done job you have put together for this plugin, I would like to apply this plugin to a particular page in my wordpress not to the whole of the website, how is this possible for example: https://www.mywebsite.com/mypostx to redirect to https://www.mywebsite.com/mobile if mobile device is detect.
Your solution would be greatly appreciated.
Thank you
https://www.ads-software.com/extend/plugins/php-mobile-redirect/
]]>Hello,
I know this topic has already been discussed but I followed those same instructions and still could not get it to work.
I put the code in at the very top of my index.php page but am having issue getting my link for “view full site” to stop redirecting to mobile. I used the default code:
<?php
setcookie(“mobile”,”m”, time()+3600, “/”);
?>
and set the cookie name in the settings to “mobile” but I just can’t seem to stop the redirect to happen when i try to take them to the full site. Is there special code I need to use for the link? here is what my link code looks like:
***a href=”https://www.circavista.com/” title=”mobile” rel=”external”<p1>View Full Site</p1>***
i took out some brackets so you could see my code, so don’t worry those are in there
the mobile site is m.circavista.com
Any help would be great, thanks! otherwise, awesome plugin
https://www.ads-software.com/extend/plugins/php-mobile-redirect/
]]>Hello,
I installed your plugin and the redirection to the mobile works great, now I want to use the feature to redirect back to the Full View site and it is not working, I placed the code in the mobile index and I make sure that the variable is the default “mobile”. Can you please let me know how can I set up the right way? Also what represents the “time()+3600” is that the time in seconds ? can that be changed to less time?
Thank you guys.
https://www.ads-software.com/extend/plugins/php-mobile-redirect/
]]>If you have just upgraded to the new plugin, you need to enable the redirect. Version 1.1 now gives you the ability to enable/disable the redirect via the settings page. After install go to Settings > PHP Mobile Redirect and select “enable” to enable the redirect.
https://www.ads-software.com/extend/plugins/php-mobile-redirect/
]]>