WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • page-by-page redirect to another website for a mobile version
  • Print
Pages: [1]   Go Down

Author Topic: page-by-page redirect to another website for a mobile version  (Read 8197 times)

MissyW

  • Guest
page-by-page redirect to another website for a mobile version
« 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 https://forum.WebsiteBaker.org/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

Offline Ruud

  • Posts: 3671
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: page-by-page redirect to another website for a mobile version
« 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) [Select]
<?php
if ( isMobile() ) {
  
header( 'Location: http://subdomain.myserver.com'.$_SERVER['REQUEST_URI'] );
  return;
}
?>

Logged
Dev4me - WebsiteBaker modules - WBhelp.org

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • page-by-page redirect to another website for a mobile version
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2