In February I wrote a post explaining how to insert a piece of code into your iWeb site which would redirect an iPhone user to another sub-site that you had specifically designed for them. Reading through the comments you may have noticed that for a few of you it didn’t work, so I have been looking for a solution.
Well now I have found one that doesn’t just include iPhones, but other phones too; so now you can cover all your bases.
Adding it to your iWeb site is as easy as last time. You can either complete your iWeb site and publish it to a folder, then open it up in a HTML editor or publish it to your MobileMe space and open it in a HTML editor directly form there.
Alternatively you can go visit Guimkie.com and download iTweak, a free app for adding lots of extra bits to your iWeb site. It is particularly useful for adding code elements to your iWeb site’s <head> section.
As regards to the code to add to your site, I found it on the excellent ESPN.com web-site. You can either copy the code shown below, or if you would rather, you can visit the site directly. Once the page has loaded, right-click with the mouse (Ctrl+click) and select ‘View Source’ from the drop-down menu.
A new window should now pop-up and you will see the code for the ESPN site. The section of the code that you need is highlighted in the image above. Of course you will have to change the redirection URL as in the previous tutorial otherwise visitors to your site will be taken straight to the mobile version of ESPN.
Once you have copied the code, search for the </head> part of code within your iWeb pages and paste in the code excerpt, save your iWeb site and publish as instructed in my previous tutorial.