I've created a web site using Joomla and want to l automatically redirect visitors who come by on their iphone to an iphone specific page. Easily done.
However, I want that iphone specific page to have links back to iphone friendly pages on the main site. Not so easy as Joomla links all pages through the index.php which has the redirect script on it.
For example, an iphone friendly video page might be mysite.com/index.php?videopage=4 or something.
I need a code that will allow me to go to this page without being redirected back to the iphone specific page. Can anyone help? Below is a piece of javascript code that used to work, but no longer does.....can anyone tell me what I need to change to make it work again? Or do I need to recreate the iphone friendly pages from scratch?
<script type="text/javascript">
if(document.referrer != "fulladdressofmysite.com/iphone/index.html"){
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
{location.replace("index.php");}
if((navigator.appVersion.indexOf("Windows CE")>0))
{location.replace("index.php");}
}
</script>
However, I want that iphone specific page to have links back to iphone friendly pages on the main site. Not so easy as Joomla links all pages through the index.php which has the redirect script on it.
For example, an iphone friendly video page might be mysite.com/index.php?videopage=4 or something.
I need a code that will allow me to go to this page without being redirected back to the iphone specific page. Can anyone help? Below is a piece of javascript code that used to work, but no longer does.....can anyone tell me what I need to change to make it work again? Or do I need to recreate the iphone friendly pages from scratch?
<script type="text/javascript">
if(document.referrer != "fulladdressofmysite.com/iphone/index.html"){
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
{location.replace("index.php");}
if((navigator.appVersion.indexOf("Windows CE")>0))
{location.replace("index.php");}
}
</script>