bjkrambo80 Posted November 22, 2011 Share Posted November 22, 2011 Kolay Gelsin. Bir hazırladıyım html tasarımım war ama bir de wap olarak tasarladıyım tasarım war ama wap dan girince index.html wap Yönlendirme nasıl yapabilirim. Quote Link to comment Share on other sites More sharing options...
Lastman Posted November 22, 2011 Share Posted November 22, 2011 html ile yapabileceğini sanmıyorum.php ya da asp ile olur.örnek php kodu buldum. [code]$iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone"); $android = strpos($_SERVER['HTTP_USER_AGENT'],"Android"); $palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS"); $berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry"); $ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod"); if ($iphone || $android || $palmpre || $ipod || $berry == true) { header('Location: http://siteadresin.com/index.wml'); } [/code] Quote Link to comment Share on other sites More sharing options...
bjkrambo80 Posted November 22, 2011 Author Share Posted November 22, 2011 Peki Php Tam olarak kodlamasını alabilirmıyım. Bu Php den Wap sitesine Yönlendiricek. Quote Link to comment Share on other sites More sharing options...
Lastman Posted November 22, 2011 Share Posted November 22, 2011 Hocam bu kodu index.php yapıp ana dizine atarsın: [code]<?php $iphone = strpos($_SERVER['HTTP_USER_AGENT'],"iPhone"); $android = strpos($_SERVER['HTTP_USER_AGENT'],"Android"); $palmpre = strpos($_SERVER['HTTP_USER_AGENT'],"webOS"); $berry = strpos($_SERVER['HTTP_USER_AGENT'],"BlackBerry"); $ipod = strpos($_SERVER['HTTP_USER_AGENT'],"iPod"); if ($iphone || $android || $palmpre || $ipod || $berry == true) { header('Location: wap.html'); } else { header('Location: web.html'); } ?>[/code] ama burada önemli bir nokta var.index.php ile index.html yi anadizine atarsan ilk olarak index.html yi görür.o yüzden web.html yazdım. Yukarıdaki kodlarda tarayıcı bilgilerine bakıyor ve içinde o kelimeler geçerse wap.html sayfasına, geçmezse web.html sayfasına yönlendiriyor. Quote Link to comment Share on other sites More sharing options...
bjkrambo80 Posted November 22, 2011 Author Share Posted November 22, 2011 Tşk. Ederim Sağolun. 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.
Note: Your post will require moderator approval before it will be visible.