Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 10:19:47 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155555 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: page-by-page redirect to another website for a mobile version  (Read 264 times)
MissyW

Offline Offline

Posts: 42


« on: January 05, 2012, 05:07:39 AM »

I have an existing website that is getting a good amount of Google traffic.  Now I want to create a version for mobiles - preferably another website, not just another wb template (as it will have reduced content).  The mobile website could sit on a sub-domain or a separate domain. 

I have read about the isMobile() snippet.  On this post http://www.websitebaker2.org/forum/index.php/topic,19589.msg133311.html#msg133311 it says you can direct to another website if a mobile device is detected.  But really, I want a page-by-page redirect, as most of my traffic land on pages other than the home page, so I would want to redirect them to the corresponding page on the mobile website.

Is this possible with isMobile() snippet?  Am I on the right track? No-one has posted on the isMobile() snippet topic since March last year - perhaps because of Rudd's comment that
Quote
The problem with the handheld stylesheets is that not all mobile browsers support them.
  But if I am redirecting to a mobile website (not a different stylesheet), this would not be a problem, I think???

(As you can probably tell, I don't have a great technical grasp of this problem).
Logged
Ruud
WebsiteBaker Org e.V.

Online Online

Posts: 2298



WWW
« Reply #1 on: January 05, 2012, 10:33:09 AM »

The isMobile function only detects if the visitor is using a mobile device.
The next step is up to you.

Redirecting to a subdomain to exactly the same page would be something like:

Code: (untested)
<?php
if ( isMobile() ) {
  
header'Location: http://subdomain.myserver.com'.$_SERVER['REQUEST_URI'] );
  return;
}
?>

Logged

Professional WebsiteBaker Solutions
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!