Results 1 to 4 of 4

Thread: Mobile Site Re-diversion
      
   

  1. #1
    Join Date
    Nov 2005
    Posts
    18

    Question Mobile Site Re-diversion

    Hi, I'm completely pulling my hair out with this one..

    I've got two websites:
    www.idriveacademy.co.uk
    and
    idriveacademy.mobi

    I'm using the .mobi version for the obvious of making it simple to read on mobile phones.

    I've tried using the following code:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.html [L]
    </IfModule>

    # END WordPress

    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /

    # prevent looping
    RewriteCond %{HTTP_HOST} !^idriveacademy.mobi$

    # if the browser accepts these mime-types, it's definitely mobile, or pretending to be
    RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC,OR]

    # a bunch of user agent tests
    RewriteCond %{HTTP_USER_AGENT} "****|symbian|*****|*******|mobile|windows ce|epoc|opera" [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "mini|nitro|j2me|midp-|cldc-|netfront|mot|up\.browser|up\.link|audiovox"[NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "blackberry|********,|*********|philips|sanyo|**** *|sie-"[NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "portalmmm|blazer|avantgo|danger|****|series60|pal msource|pocketpc"[NC,OR]
    RewriteCond %{HTTP_USER_AGENT} "smartphone|rover|ipaq|au-mic,|*******|ericy|vodafone\/|wap1\.|wap2\.|******|android"[NC]

    # rewrite rules here
    RewriteRule ^(.+)\$ http://www.idriveacademy.mobi/$1 [R=302,NC]


    some questions..
    1) where do i put the code
    2) Have I missed anything ?
    3) does it matter if the .index pages are HTML or .PHP for both websites ?

    sorry if this sounds like a newbie question but there's very little easy help on this subject

  2. #2
    Join Date
    Nov 2005
    Posts
    18

    Question Vodahost recommended mobile script for begginers

    Just read thru another post..
    http://www.vodahost.com/vodatalk/blu...blue-voda.html

    Apparently making it simple for mobile phone detect and divert.. mmmm

    OK, i've downlaoded the Mobile Device Detector and i'll quote

    "5. And, you mustn't forget to use the all-important Mobile Device Detection Script which when installed on your .com/.org/.info/.biz website can detect if a Visitor is using a mobile device (telephone) and then automatically "forward" them seamlessly to your specially prepared .mobi site: Use this simple Java based "DnD" (Detect and Direct) code > http://code.google.com/p/mobiledevic...or-0.1-src.zip"

    Downloaded the file.. can only find the file thats related : MobileDeviceDetector\src\java\mob
    the script is in there, but no easy way of telling which website is going to divert to (.mobi)

    Or am i missing something
    And where does this script go into ?

  3. #3
    Join Date
    Mar 2006
    Posts
    14,683

    Default Re: Vodahost recommended mobile script for begginers

    Read the ".txt" file that is included for installation instructions, as well as the documentation on the actual Download page. You must simply modify the script to show your specific MOBI site.
    And, there are expanded instructions in the Google Developer pages that preface this download.

    Nothing was promised as "easy" .... only effective and precisely what is required. I myself used it successfully on 3 sites more years ago, but have since forgotten specifically the steps I used. You might have to do a Google Search on your own to find instructions you can use.

  4. #4
    Join Date
    Nov 2005
    Posts
    18

    Default Re: Mobile Site Re-diversion

    Finally got it working... its more simple than I thought..
    Here's the steps I used:

    1) goto the the Blue FTP (Tools FTP Manager)
    2) Locate the root folder and look for a file .htaccess and copy the file onto your pc/voda folder
    3) Edit the the file using wordpad/notepad etc
    4) Goto http://wordpress.org/support/topic/h...using-htaccess
    5) Copy and the TOP script, (the second script doesn't work for some reason)
    6) Edit the following:
    # prevent looping RewriteCond %{HTTP_HOST} !^m.mysite.com$

    and:

    # rewrite rules here
    RewriteRule .? http://m.mysite.com%{REQUEST_URI} [L,R=302]

    remember if your using a .mobi version to include the full http://www.mobilesite.co.uk (.com/.net etc)
    ** do not delete any of the $ or ? [spaces] characters etc

    4) Save the file with the new edited script
    (recommend you leave a carriage (return) between the new script and anything else underneath it
    5) Delete the old .htaccess script in the root of the folder
    6) Copy the new script over into the root of the folder
    7) Works a treat


    If you find it doesn't work copy the original script at the above link without editing anything, this should divert to mysite.com
    then edit your the text with mysite text
    remember you need to copy the old .htaccess file over, edit it, save it and delete the old one in the root of the folder
    everytime you edit it.
    There's less margin for error.

    Hope this helps any other newbie's lol Thanks again, Vasili. The scripts rocks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •