Results 1 to 4 of 4

Thread: Mobile Site Re-diversion

  1. #1
    Join Date
    Nov 2005

    Question Mobile Site Re-diversion

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

    I've got two websites:

    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]

    # END WordPress

    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /

    # prevent looping
    RewriteCond %{HTTP_HOST} !^$

    # 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 ^(.+)\$$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

    Question Vodahost recommended mobile script for begginers

    Just read thru another post..

    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 >"

    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

    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

    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
    5) Copy and the TOP script, (the second script doesn't work for some reason)
    6) Edit the following:
    # prevent looping RewriteCond %{HTTP_HOST} !^$


    # rewrite rules here
    RewriteRule .?{REQUEST_URI} [L,R=302]

    remember if your using a .mobi version to include the full (.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
    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