Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

Thanx for cutting back the foliage and showing me the way. Im off to explore.

 

Wayne :)

Posted

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 :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...