it is such that I know only imagine that when you are log on mobile then you should be sent to mobil.navn.dk. it is only if you are on iphone or ipad or other mobiles. then dne do like that. and if you are on the browser it should not be possible to log on browser page that is navn.dk.
I've tried to do this:
<script type="text/javascript">
if (screen.width<800) {
window.location="http://mobil.mebe.dk/";
}
</script>
and i have tried this here:
<?php
function detect_mobile()
{
if(preg_match('/(alcatel|amoi|android|avantgo|blackberry|benq|cell|cricket|docomo|elaine|htc|iemobile|iphone|ipad|ipaq|ipod|j2me|java|midp|mini|mmp|mobi|motorola|nec-|nokia|palm|panasonic|philips|phone|playbook|sagem|sharp|sie-|silk|smartphone|sony|symbian|t-mobile|telus|up\.browser|up\.link|vodafone|wap|webos|wireless|xda|xoom|zte)/i', $_SERVER['HTTP_USER_AGENT']))
header('Location: http://mobil.navn.dk/');
else
header('Location: http://www.navn.dk/');
}
?>
JavaScript seems to me just seems too old-fashioned or is there any other way to do it?