title: Excluding a subdomain from RewriteCond
body: <p>I'm running a Zend Framework (PHP) application on Apache. As you might know, this framework requires all URLs to be routed to <code>public/index.php</code> (front controller pattern). Therefore, i've added the following rules to the <code>.htaccess</code> in the <code>public_html</code> directory:</p>
  
  <pre><code>RewriteEngine On
  
  RewriteRule ^\.htaccess$ - [F]
  
  RewriteCond %{REQUEST_URI} =""
  RewriteRule ^.*$ /public/index.php [NC,L]
  
  RewriteCond %{REQUEST_URI} !^/public/.*$
  RewriteRule ^(.*)$ /public/$1
  
  RewriteCond %{REQUEST_FILENAME} -f
  RewriteRule ^.*$ - [NC,L]
  
  RewriteRule ^public/.*$ /public/index.php [NC,L]
  
  # rewrite non-www url's
  RewriteCond %{HTTP_HOST} !^www\.
  RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
  </code></pre>
  
  <p>In DirectAdmin, I've created a subdomain called <code>newsletter</code>, which (by default i guess) expects its files to reside in <code>public_html/newsletter</code>. However, when i visit <code>newsletter.mydomain.com/somefile.html</code> the <code>.htaccess</code> rules redirect this to <code>http://www.newsletter.mydomain.com//public/newsletter/</code>.</p>
  
  <p>How can I exclude my subdomain from the <code>.htaccess</code> rules ?</p>