Greenguy's Board


Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2009-09-07, 03:35 PM   #1
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
OK, This is what I ended up doing and it seems to be working well.

In my htaccess,
Code:
DirectoryIndex  index.php index.shtml index.html index.htm
This way index.php is looked for first.

Then in the index.php file I put this,
Code:
<?php
$REGULAR_URL = 'http://cleos-porn-links.com/index.shtml';
$MOBILE_URL = 'http://mobile.cleos-porn-links.com/';

// Do not edit below
$WORDS = array('mobile', 'blackberry', 'j2me', 'webos', 'windows ce', 'android', 'nokia', 'samsung', 'LG', 'palm', 'PSP');
$is_mobile = FALSE;
foreach ($WORDS as $w)
{
	if (isset($_SERVER['HTTP_USER_AGENT']) 
		&& stripos($_SERVER['HTTP_USER_AGENT'], $w))
	{
		$is_mobile = TRUE;
		break;
	}
}
$url = ($is_mobile) ? $MOBILE_URL : $REGULAR_URL;
if (!empty($url))
{
	header('Location: ' . $url);
}
?>
(The links on my mobile domain are getting changed to http://cleos-porn-links.com/index.shtm sometime in the next day or so. Until then the "View Full Web Version" link does not go to my non mobile site)
This way mobile surfers can still reach my regular site but will get presented with a mobile option first. Non mobile surfers will not notice anything different at all and both mobile and non mobile users can still reach any non mobile page too.

On a side note... I modified the htaccess in my porntube by adding this,
Code:
RewriteCond %{HTTP_USER_AGENT} (mobile|blackberry|j2me|symbian|windows.ce) [NC]
RewriteRule ^(.*)$ http://mobile.cleos-porn-links.com/ [R=302,L]
Now the mobile traffic is going to my Topbucks white label site instead of Brazzers.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:50 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc