New iPhone Redirect Action Help

I think there might be a problem with it. I’ve created a new Freeway Document in 5.3.1 and I’ve created a “mobile” subfolder (under the site folder) to house the iPhone version of a random “dummy” test site. I apply the Page Action to the non-mobile version “index.html” page to try and get an automatic redirect to the “index.html” file in the “mobile directory” to test in the iPhone simulator. After I applied the action I published. I then try and test the site in the iPhone simulator and it keeps refreshing my non-mobile “index.html” page till it says “Page cannot be found.” I then view the source code, Safari 3.2.1, and the code snippet that gets added:

<script type="text/javascript">//<![CDATA[
if(navigator.userAgent.match(/iPhone|iPod/i)){
window.location="index.html"
}
//]]></script>

should probably have my folder name added to it, right?

{    window.location="**mobile**/index.html"    }

I’m guessing that most people would want to keep their regular site from their mobile version and would probably want to have a subfolder to separate the two.

I’ve tried two other things and it still doesn’t work.

Am I doing something wrong or does this not work quite right?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Just to add that I did just add manually the “HTML Markup (Before )” of:

<script type="text/javascript">//<![CDATA[
if(navigator.userAgent.match(/iPhone|iPod/i)){
window.location="mobile/index.html"
}
//]]></script>

and it worked! Must be something wrong with the action. Test first!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options