title: Trying to exclude a URL from htaccess rule
body: <p>I'm trying to setup a global mobile redirect in my httpd.conf for all of my sites on the server and only have to edit it once, vs. 92 times. All sites mobile will redirect to one locate so that's fine.</p>
  
  <p>However I want to exclude one particular URL from redirecting at all. Here's what I have so far that isn't working and causing a redirect loop:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{HTTP_USER_AGENT} ^.*iphone|ipod|blackberry|android|sgh|sonyericsson|psp|mot|htc|lg|nokia|palm|treo|j2me|webos|smartphone|symbian.*$ [NC]
  RewriteCond %{REQUEST_URI} !^http://www.example.com/mobile [NC]
  RewriteRule ^(.*) http://www.example.com/mobile [R=302,L]
  </code></pre>
  
  <p>Can anyone figure out why it's causing a redirect loop on that particular url? It's just a folder on that domain with a .htaccess in it only containing <code>RewriteEngine off</code> and an index.php file with a header() redirect call.</p>