Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Mobile Device Redirection

Participant ,
Jun 30, 2009 Jun 30, 2009

Copy link to clipboard

Copied

I'm currently working on some pages intended for mobile devices.

Is there a reliable method of redirecting via a script from my main site to my mobile content directory, if the browser detects a mobile device?

(As an aside, I tried my pages in ADC CS4 and they wouldn't display php files for my chosen devices. Most of the content can be stripped down to html, but is this issue of php/html due to ADC or mobile browser limitations?)

TOPICS
Server side applications

Views

1.3K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 04, 2009 Jul 04, 2009

No problem. Glad you managed to get it sorted.

Votes

Translate
LEGEND ,
Jul 02, 2009 Jul 02, 2009

Copy link to clipboard

Copied

You need to set up a testing server to be able to preview PHP pages in Device Central.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 02, 2009 Jul 02, 2009

Copy link to clipboard

Copied

Hi David

Thank you for the suggestion and the link. I do have MAMP set up and working on my system - so I can follow along happily with some of your extremely helpful books!

However, I am still getting the message "The file type of index.php is not supported on this device!" even though I know the device does display php content. (I have tested it physically using the device itself.)

I have tried unsuccessfully using both these doc types:

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

and


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 03, 2009 Jul 03, 2009

Copy link to clipboard

Copied

I have just tested a PHP page in Device Central CS4. It worked fine, using my local testing server and XHTML 1.0 Transitional DOCTYPE.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 03, 2009 Jul 03, 2009

Copy link to clipboard

Copied

many thanks - it's the first time I've posted to this forum - impressive

speed of response especially when it took up so much of my time last night -

will remember this in future.

again, thanks

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 03, 2009 Jul 03, 2009

Copy link to clipboard

Copied

This is strange then and maybe it has something to do with my setup, as I have just tested an info.php file:

<?php phpinfo(); ?>

and got the same result, so I know it's not the file contents.

I'm on an iMac running 10.5.7 with MAMP and my localhost is running perfectly well as far as I can see - I've even got local versions of Magento sites running properly.

I'm going to try a repair of Device Central CS4 and see if that makes any difference. (Mind you - I get the same results with ADC CS3 so maybe there is something in the MAMP settings I need to check...)

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 03, 2009 Jul 03, 2009

Copy link to clipboard

Copied

I normally use Windows, but I have just tested it on MAMP in my MacBook Pro. Device Central CS4 displays my phpinfo() without problem.

I suspect it has something to do with your site definition.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 03, 2009 Jul 03, 2009

Copy link to clipboard

Copied

Thanks for your time and help David.

I'll check my MAMP setup first - I'm not sure if the site deinition is the issue as I tested the phpinfo() directly from my sites folder and it displays everything correctly from there when I view it at http://localhost/info.php.

I'm going back to the link you sent to your article and see if there is something in there.

Thanks again - I'll post when I've resolved this.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 03, 2009 Jul 03, 2009

Copy link to clipboard

Copied

David, I am so sorry to have wasted your time...

The fault was entirely down to me using Device Central > File > Open rather than going from Dreamweaver > File > Preview In Browser > Device Central.

A tip to other users, who may (like me) waste the valuable time of professionals - READ THE MANUAL!

Thank you once again.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 04, 2009 Jul 04, 2009

Copy link to clipboard

Copied

LATEST

No problem. Glad you managed to get it sorted.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines