title: URL rewriting for mobile devices
body: <p>I know that this question has a been asked many times, but I still can't figure out what's going wrong in my code.</p>
  
  <p>I have a stylesheet link on my HTML</p>
  
  <pre><code>&lt;link rel="stylesheet" href="style.css" type="text/css" media="screen" /&gt;
  </code></pre>
  
  <p>And I want to redirect to another file if the user is on a mobile device.
  I did it this way:</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{REQUEST_URI} !^/style.css$
  RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|webos|googlebot-mobile" [NC]
  RewriteRule (.*) /mobile.css [L,R=302]
  </code></pre>
  
  <p>My files are all in the root of a subdomain, so I guess that the rule <code>!^/style.css$</code> should be correct.</p>
  
  <p>When I try to reach <code>/style.css</code>, I don't have a redirection, but when a try to reach <code>/</code>, Firefox tells me there is a redirection loop.</p>
  
  <p>Do I miss something?
  Thanks</p>