Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-07-2011, 11:07 AM   #1
cybermike
Confirmed User
 
Join Date: Jan 2002
Location: Ny
Posts: 4,109
Need help with htaccess mobile and country redirect

Ok this is what I use to redirect mobile traffic

#redirect mobile browsers

RewriteCond %{HTTP_USER_AGENT} ^.*iphone|ipod|ipad|blackberry|android|sgh|sonyeri csson|psp|mot|htc|lg|nokia|palm|treo|j2me|webos|sm artphone|symbian.*$ [NC]
RewriteRule ^(.*)$ RewriteRule .* http://domain/mobile/ [R=302,L]

Now how do I keep my US/Canada traffic to going to http://domain.com/mobile and have the following countries go to http://domain.com/mobile2

Germany
France
Sweden
etc

I'm not having much luck messing around with php I rather do this in htaccess

Thanks
__________________
Hey surfers how about some The Best Porn Sites
cybermike is online now   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-07-2011, 12:45 PM   #2
fuzebox
making it rain
 
fuzebox's Avatar
 
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,036
Easiest way for you would be to use the free maxmind country database: http://www.maxmind.com/app/geolitecountry

Ask your host to install mod_geoip, and then you can add the geoip stuff to your htaccess files alongside the mobile redirection.

http://www.maxmind.com/app/mod_geoip
fuzebox is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.