waynemac Posted November 18, 2004 Posted November 18, 2004 Gidday all, I run a PC and a mobile website and want to detect the visitors host and then send to an appropriate folder. Eg, mobile hosts like docomo.ne.jp would go to /mobile/ and abc.com would go to /phpwebsite/ folder. Any info on what to do, where to go etc would be appreciated. Cheers, Wayne Rock Sign Quote
TCH-Bruce Posted November 18, 2004 Posted November 18, 2004 Wayne, I wouldn't try where they are coming from. I would try brower detection and then send them to the appropriate section of your site. Google for "browser detection" and I am sure you will find something you can use. Quote
waynemac Posted November 18, 2004 Author Posted November 18, 2004 Thanx for cutting back the foliage and showing me the way. Im off to explore. Wayne Quote
waynemac Posted November 22, 2004 Author Posted November 22, 2004 And exploring I did. Was reading thru Japanese BBS threads and got the following...I added to .htaccess RewriteEngine on RewriteCond %{HTTP_USER_AGENT} ^DoCoMo [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^J-PHONE [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^KDDI [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^UP.Browser [NC,OR] RewriteCond %{HTTP_USER_AGENT} ^DDIPOCKET [NC] RewriteRule ^.*$ http://www.fukuokaguide.com/mobile/index.html [L] and then created a .htaccess in /Mobile to set a RewriteEngine off command. And work it did. Hope this is helpful to someone one day. Wayne Quote
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.