ajnl Posted December 26, 2010 Share Posted December 26, 2010 Hey, so whats an easy and simple way to have a website redirect to the mobile version? Quote Link to comment Share on other sites More sharing options...
*Sypher* Posted December 26, 2010 Share Posted December 26, 2010 Several option are being discussed here, maybe it can be of help: http://www.daniweb.com/forums/thread163112.html Quote Link to comment Share on other sites More sharing options...
ajnl Posted December 27, 2010 Author Share Posted December 27, 2010 I read through that b4, but I couldn't find anything useful. Quote Link to comment Share on other sites More sharing options...
ajnl Posted December 27, 2010 Author Share Posted December 27, 2010 Never mind I figured something out! I love php . Quote Link to comment Share on other sites More sharing options...
Heretic121 Posted February 12, 2013 Share Posted February 12, 2013 <script type="text/javascript"> var mobile_domain ="website.address.here"; // Set to false to not redirect on iPad. var ipad = true; // Set to false to not redirect on other tablets (Android , BlackBerry, WebOS tablets). var other_tablets = true; document.write(unescape("%3Cscript src='"+location.protocol+"//s3.amazonaws.com/me.static/js/me.redirect.min.js' type='text/javascript'%3E%3C/script%3E")); </script> Simple JS redirect, just in case anyone else needs help with it Quote Link to comment Share on other sites More sharing options...
Chuckun Posted February 12, 2013 Share Posted February 12, 2013 Nice share.. However it would probably be better to use a htaccess rewrite rule if possible because is faster and doesnt rely on JS which can be disabled on most browsers.. Quote Link to comment Share on other sites More sharing options...
Krayzie Posted February 12, 2013 Share Posted February 12, 2013 However relevant this may be, my eyes bleed to see a two year old topic revived ;P Quote Link to comment Share on other sites More sharing options...
Chuckun Posted February 13, 2013 Share Posted February 13, 2013 Oh wow I didnt notice that oart.. Mobile version is debilitating.. XD Quote Link to comment Share on other sites More sharing options...
Krayzie Posted February 13, 2013 Share Posted February 13, 2013 Oh wow I didnt notice that oart.. Mobile version is debilitating.. XD Hey, don't blame the mobile, I saw it! Quote Link to comment Share on other sites More sharing options...
ajnl Posted February 13, 2013 Author Share Posted February 13, 2013 Nice share.. However it would probably be better to use a htaccess rewrite rule if possible because is faster and doesnt rely on JS which can be disabled on most browsers.. how would you do it with htaccess? I'm not the webmaster for that organization anymore, but just out curiosity lol. I used php back then. Quote Link to comment Share on other sites More sharing options...
Chuckun Posted February 13, 2013 Share Posted February 13, 2013 You can do it based on the detected device.. Search google for htaccess mobile browser detection on mobile right now >.< Quote Link to comment Share on other sites More sharing options...
Heretic121 Posted February 13, 2013 Share Posted February 13, 2013 However relevant this may be, my eyes bleed to see a two year old topic revived ;P Holy cr*p... my bad. I didn't notice that at all xD Quote Link to comment Share on other sites More sharing options...
Octane Posted February 13, 2013 Share Posted February 13, 2013 Try this http://m.fearless-assasins.com. this URL is what my android phone uses! hope this helps! Quote Link to comment Share on other sites More sharing options...
ajnl Posted February 13, 2013 Author Share Posted February 13, 2013 You can do it based on the detected device.. Search google for htaccess mobile browser detection on mobile right now >.< Well you're no help . haha just messing. Thanks, i'll look it up some time Try this http://m.fearless-assasins.com. this URL is what my android phone uses! hope this helps! not looking for the FA mobile website. The question is if you are hosting a website (www.example.com) how do you have it redirect to the mobile website when some1 accesses it from an iphone or android. And how do you get it to redirect to the tablet website, when it is accessed with a tablet. Quote Link to comment Share on other sites More sharing options...
Administrators daredevil Posted February 14, 2013 Administrators Share Posted February 14, 2013 not looking for the FA mobile website. The question is if you are hosting a website (www.example.com) how do you have it redirect to the mobile website when some1 accesses it from an iphone or android. And how do you get it to redirect to the tablet website, when it is accessed with a tablet. Try this: http://code.google.com/p/php-mobile-detect/ OR function checkMobile() { if (preg_match("/Mobile|Android|BlackBerry|iPhone|Windows Phone/", $_SERVER['HTTP_USER_AGENT'])) { header(Location: MOBILE SITE); } <?php checkMobile() ?> Their are tons of way to do it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.