Forum Moderators: bakedjake
RewriteEngine On
RewriteBase /
# Mobile redirect
# If desktop cookie is not equal to true - then process
# Prevents an endless loop
RewriteCond %{HTTP_COOKIE} !^.*desktop=true [NC]
#Only proceed if the host is www version (ignore on mobile site)
RewriteCond %{HTTP_HOST} ^www\.fullsite\.com$ [NC]
# if the browser accepts these mime-types, it's mobile device
RewriteCond %{HTTP_ACCEPT} "text\/vnd\.wap\.wml|application\/vnd\.wap\.xhtml\+xml" [NC,OR]
# Try different mobile user_agents
RewriteCond %{HTTP_USER_AGENT} "sony|symbian|nokia|samsung|mobile|windows ce|epoc|opera" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "mini|nitro|j2me|midp-|cldc-|netfront|mot|up\.browser|up\.link|audiovox"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "blackberry|ericsson,|panasonic|philips|sanyo|sharp|sie-"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "portalmmm|blazer|avantgo|danger|palm|series60|palmsource|pocketpc"[NC,OR]
RewriteCond %{HTTP_USER_AGENT} "rover|ipaq|au-mic,|alcatel|ericy|vodafone\/|wap1\.|wap2\.|"[NC]
RewriteCond %{HTTP_USER_AGENT} "smartphone|mobile|iPhone|android"[NC]
RewriteRule ^(.*)$ [m.fullsite.com...] [R=301]