title: Redirect to mobile version, respecting domain, with htaccess
body: <p>I have a site which has multiple domains, ie:</p>
  <pre><code>www.site.co.uk
  www.site.ru
  www.site-german.de
  </code></pre>
  <p>And the mobile version is in  <code>/mobile/</code></p>
  <p>How can I redirect from the current domain to <code>/mobile/</code> path?</p>
  <p>I believe I need to check if the domain is one of the listed and the current path is not mobile, right? ( I am really bad with regular expressions.. )</p>
  <p>This is what I have for now:</p>
  <pre><code>RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
      RewriteCond %{HTTP_USER_AGENT} &quot;android|blackberry|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile&quot; [NC]
      RewriteRule ^(.*)$ http://example.com/mobile/$1 [L,R=302]
  </code></pre>
  <p>Which works, but as you can see it doesn't check if the current path is '/mobile/' and it doesn't check for the other domains..</p>
  <p>Any hints?</p>