WAP traffic redirect script

MistorToker

Myopic Asshole
Mar 31, 2010
245
6
0
Bay Area, CA
one of my online buys is getting a shitload of mobile traffic, need to check for browser type and OS (i'm using different offers for different mobile OS) & redirect to them. php only, no JS please because i was having browser compatibility issues and unsatisfactory results


KAYLEE-CARVER-2.jpg
 


Have you tried htaccess?
Here's what I use. Your post just reminded me to do an update on the user agent in my file.

Code:
#HTACCESS MOBILE SITE REDIRECTION CODE
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (mobile|blackberry|j2me|symbian|windows.ce) [NC]
RewriteRule ^(.*)$ http://www.somedomain/imakemoneymobiletraffic.html [R=302,L]
 
it might be faster than php, i'm doing ~100k clicks/day so wouldn't htaccess rape performance? sorry for being completely fucking clueless and having no idea, all i know is i need a solution soon
 
100k a day is nothing in terms of using htaccess and performance, but if you are really worried (and have access to apache configs), put the mod_rewrite rules in the main config file.