[wp-hackers] Question about auto-detecting

Gregg F. Tomlinson gregg at fatheaddesign.com
Tue Aug 3 14:12:16 UTC 2010


Hello:

Been lurking on this list for quite a while, never submitted a  
question until now & hopefully you folks can help.

I have a project in production right now where I am building a bunch  
of mobile-only websites on top of WP which will all be managed thru  
the same backend. These sites are all for the same client, hence the  
"one backend, multiple sites" approach. When I started building this  
project I was using WP Mu, but will most likely move this into WP 3 's  
multi-site function.

Here's the catch: These sites are all "mobile only" because the client  
has existing Flash sites that they still want their desktop users to  
see, and have the mobile users get auto-rerouted to the WP sites.

  My initial thought (and mode for buildout) was to run all the sites  
as subdomains under the same URL, ie:

mobile1.mobiledomain.com

mobile2.mobiledomain.com

etc.

The flash sites all have independent URL's, so I would need to throw  
in some browser sniffing code (either in .htaccess or PHP) on these  
main URL's to redirect the sites to their mobile counterparts, so the  
sites would route like this:

flashsite1.com  ==>>  mobileusers go to mobile1.mobiledomain.com

flashsite2.com  ==>>  mobileusers go to mobile2.mobiledomain.com

However, now I'm wondering if this is possible, since the freestanding  
Flash sites will all be on independent URL's, and the WP sites will be  
on subdomains.

Does anyone know of any way of doing browser detection like this, or  
would I be better off running the mobile versions in a subdomain on  
the same URL, ie:

www.flashsite1.com  ==>>  mobileusers go to mobile.flashsite1.com  
(same URL, same webhost, just different dir in which the site is stored)

www.flashsite2.com  ==>>  mobileusers go to mobile.flashsite2.com  
(same URL, same webhost, just different dir in which the site is stored)

Drawback to this methodology is that I would have multiple WP installs  
for the client to manage here.

Thoughts? I appreciate your help on this, I looked around in the codex  
but couldn't find anything that dealt with this particular issue since  
it's pretty unique.

Thanks in advance!

--g

::::  ::::  ::::

Gregg Tomlinson
Principal

fathead design, inc.
1329 W. Loyola Ave.
Suite G2
Chicago, Illinois  60626

p: 773.338.1313
f: 773.338.1340

http://www.fatheaddesign.com

** please consider the environment before you print this e-mail **






More information about the wp-hackers mailing list