title: how to redirect from mobile site to full site with .htaccess
body: <p>Below is my .htaccess file that i got from 
  <a href="https://stackoverflow.com/questions/3680463/mobile-redirect-using-htaccess">Mobile Redirect using htaccess</a></p>
  
  <pre><code># Check if mobile=1 is set and set cookie 'mobile' equal to 1
  RewriteCond %{QUERY_STRING} (^|&amp;)mobile=1(&amp;|$)
  RewriteRule ^ - [CO=mobile:1:%{HTTP_HOST}]
  
  # Check if mobile=0 is set and set cookie 'mobile' equal to 0
  RewriteCond %{QUERY_STRING} (^|&amp;)mobile=0(&amp;|$)
  RewriteRule ^ - [CO=mobile:0:%{HTTP_HOST}]
  
  # cookie can't be set and read in the same request so check
  RewriteCond %{QUERY_STRING} (^|&amp;)mobile=0(&amp;|$)
  RewriteRule ^ - [S=1]
  
  # Check if this looks like a mobile device
  RewriteCond %{HTTP:x-wap-profile} !^$ [OR]
  RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC,OR]
  RewriteCond %{HTTP:Profile}       !^$
  
  # Check if we're not already on the mobile site
  RewriteCond %{HTTP_HOST}          !^m\.
  # Check to make sure we haven't set the cookie before
  RewriteCond %{HTTP:Cookie}        !\mobile=0(;|$)
  # Now redirect to the mobile site
  RewriteRule ^ http://m.domain.com%{REQUEST_URI} [R,L]
  </code></pre>
  
  <p>Using this will redirect to m.domain.com like i was hoping.</p>
  
  <p>My issue is with redirecting user back to the full site.</p>
  
  <p>Can someone please explain to me how i can accomplish this.</p>
  
  <p>Thank you</p>
  
  <p>Edit*</p>
  
  <p>Full .htaccess file</p>
  
  <pre><code>RewriteEngine On
  RewriteBase /
  
  #https://stackoverflow.com/questions/3680463/mobile-redirect-using-htaccess
  # Check if mobile=1 is set and set cookie 'mobile' equal to 1
  RewriteCond %{QUERY_STRING} (^|&amp;)mobile=1(&amp;|$)
  RewriteRule ^ - [CO=mobile:1:%{HTTP_HOST}]
  
  # Check if mobile=0 is set and set cookie 'mobile' equal to 0
  RewriteCond %{QUERY_STRING} (^|&amp;)mobile=0(&amp;|$)
  RewriteRule ^ - [CO=mobile:0:%{HTTP_HOST}]
  
  # cookie can't be set and read in the same request so check
  RewriteCond %{QUERY_STRING} (^|&amp;)mobile=0(&amp;|$)
  RewriteRule ^ - [S=1]
  
  # Check if this looks like a mobile device
  RewriteCond %{HTTP:x-wap-profile} !^$ [OR]
  RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC,OR]
  RewriteCond %{HTTP:Profile}       !^$
  
  # Check if we're not already on the mobile site
  RewriteCond %{HTTP_HOST}          !^m\.
  # Check to make sure we haven't set the cookie before
  RewriteCond %{HTTP:Cookie}        !\mobile=0(;|$)
  # Now redirect to the mobile site
  RewriteRule ^ http://m.domain.com%{REQUEST_URI} [R,L]
  
  RewriteCond %{REQUEST_FILENAME} -s [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^.*$ - [NC,L]
  RewriteRule ^.*$ index.php [NC,L]
  </code></pre>