hyper/boʊl/e

a delightful dish of Studio Hyperset news and information

Mobile Redirect Update

Posted by Quimby Melton on November 12, 2006

For an up-to-date list of posts/comments on this topic and a link to the most current version of the script(s), visit the MOBILE REDIRECT CODE DISCUSSION INDEX.

Updating this posting of October 6th, the .asp and .php user_agent scripts have been “finalized” in the Studio Hyperset webpage. Inserted into the pole position of the <head> section of the index page using the following three <script> tags, these scripts are called when the page loads:

<script type=”text/php” language=”php” src=”/scripts/mobile.php”></script>

<script type=”text/vbscript” language=”vbscript” src=”/scripts/mobile.asp”></script>

<script type=”text/vbscript” language=”vbscript” src=”/scripts/mobile2.asp”></script>

Here’s an updated version of the three scripts as running on the website, and here’s a discussion of various other ways to control mobile traffic to a website.

14 Responses to “Mobile Redirect Update”

  1. [...] UPDATED 11/12/06 – READ HERE [...]

  2. Ryan said

    Hi

    thank you for your work! I am trying to get this to work and having trouble getting it to work; something on my end!

    In your sourcepage in the pole position of the the head i see

    Do I need the part or I should copy/paste the three into the pole position of the head of my index.htm?

    Thanks for ur work … back in trying to get it to work…im learning as I go.

  3. Ryan said

    that part i refer to is

  4. Ryan said

    oh well seems i can not post any type code syntax here … each of my responses gets cut off making me seem like im making no sense

  5. Paul or Ryan (if I may):
    Regarding your post …
    What you’ll want to do is as follows:
    1) Download the three scripts posted here: http://www.studiohyperset.com/resources/redirect2.zip
    2) Load these scripts onto your server profile in the root directory of your homepage or wherever you want them. Just be sure to set permissions on them to 755.
    3) Place the script tags listed in the post above in the header section of your homepage.
    MAKE SURE the paths to the scripts are correct, ok?
    Quite frankly, I’m not even sure they’re working. All the .asp and .php syntax is correct, but I’m not sure they’re recognized at page load. If you have a mobile device, perhaps you’ll try accessing the following webpage: http://www.studiohyperset.com and let me know if something that looks like this page http://mobile.studiohyperset.com comes up.
    Basically, you’d be able to tell if the links are lined up vertically vs. in a pyramidal sort of shape. If they’re in the pyramidal shape, the main homepage is just loading rather than the mobile.
    If you check the page/scripts on your mobile device, perhaps you’ll let me know the result, eh mate?
    Let’s keep working with the scripts and see if we can’t get it all to work.

  6. Meghan said

    Thanks for the great bunch of code! It wasn’t working for me initially, but I made the following changes:

    changed USER_AGENT to HTTP_USER_AGENT

    deleted the last 2 lines with the header and else statement making it go back to $main – this was getting it trapped in a loop

    I am using PHP so I added the script file as an include file ?php include ‘mobile.php’? instead of a script tag in the header. You could do the same for ASP !–#INCLUDE file=”mobile.asp”– (I left off the tag enclosures in case the forum would actually read it as code)

    It works perfectly for me now. Hope that helps!

  7. Danielle said

    The code works great. Although I have a Samsung D900 which I believe is WAP 2.0, it doesn’t pick the correct Website? In the PHP code it is included as ‘SAMSUNG-SGH-’ It is shown in my Website stats that the browser name as ‘SAMSUNG-SGH-D900′ and ‘SAMSUNG-SGH-D900/1′

    Any suggestions?

    Many Thanks,

    Dani

  8. [...] Redirect Code Update January 11th, 2007 Thanks to a helpful hint from Danielle, the following code strings need to be inserted into the mobile.php code previously [...]

  9. [...] Stupid Hyperset has us covered with a mix of PHP and VBScript to detect a large list of User Agents and forward [...]

  10. [...] después de todo se trata básicamente de un adelgazamiento intensivo más que de un rediseño), haremos uso de un script que se encarga de hacer la redirección si es necesario añadiendo en la cabecera de nuestra [...]

  11. I’m trying to use your script but even though it’s detecting the include it’s not parsing properly. I’m using a Palm T|X with Blazer 4.3 and it’s still redirecting me to the main site as opposed to the mobile site. Any Ideas

  12. I’m trying to use your script but even though it’s detecting the include it’s not parsing properly. I’m using a Palm T|X with Blazer 4.3 and it’s still redirecting me to the main site as opposed to the mobile site. Any Ideas

  13. help said

    i took the mobile2 script code and reference it on the head section, but it still not working, and after putting it on, it is breaking the page, the frames which were on the page are not showing, but the source its fine

  14. Very sorry. I’m not really maintaining this script anymore.

    :: http://studiohyperset.wordpress.com/2007/06/15/studio-hyperset-mobile-redirection-code-and-the-iphone/

    I leave it up for interested coders to play around with.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>