|
|
|
|
|
|
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
![]() |
#8 |
Subversive filth of the hedonistic decadent West
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 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); } ?> 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] ![]() |
![]() |
![]() |
|
|