Need help? Check out our Support site, then


How to add mobile redirect code

  1. I want to add redirect code for my existing mobile website into the ehader

    The blog I need help with is thenewplumbingguide.wordpress.com.

  2. <script type="text/javascript"><br /> var url='http://books.indygetmobile.com/';var host_name=document.location.hostname;var request_uri=document.location.pathname;var no_mobile=location.search;var cookie=document.cookie;<br /> function detect(){var ua=navigator.userAgent.toLowerCase();var devices=['vnd.wap.xhtml+xml','sony','symbian','nokia','samsung','mobile','windows ce','epoc','opera mini','nitro','j2me','midp-','cldc-','netfront','mot','up.browser','up.link','audiovox','blackberry','ericsson','panasonic','philips','sanyo','sharp','sie-','portalmmm','blazer','avantgo','danger','palm','series60','palmsource','pocketpc','smartphone','rover','ipaq','au-mic','alcatel','ericy','vodafone','wap1','wap2','teleca','playstation','lge','lg-','iphone','android','htc','dream','webos','bolt','nintendo'];for(var i in devices){if(ua.indexOf(devices[i])!=-1){return true}}}<br /> if(no_mobile!='?nomobile=1'&&cookie.indexOf('no_mobile')==-1){is_mobile=detect();if(is_mobile){window.location=url}}else{if(cookie.indexOf('no_mobile')!=-1){}else{cookie_expires=new Date();cookie_expires.setTime(cookie_expires.getTime()+60*60*24);document.cookie="no_mobile=1; expires="+cookie_expires.toGMTString()+"; path=/;"}}<br /> </script>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.