title: Apache mod_rewrite only if request does not start with '/THEMES/'
body: <p>I'm writing a CMS in PHP, and now I'm working at the themes feature. I have a .htaccess file:</p>
  
  <pre><code>RewriteEngine ON
  RewriteRule ^([a-zA-Z][a-zA-Z0-9]*)$ index.php?m=$1
  RewriteRule ^([a-zA-Z][a-zA-Z0-9]*)/(.+)$ index.php?m=$1&amp;p=$2
  </code></pre>
  
  <p>If I have a request to:</p>
  
  <pre><code>/page
  </code></pre>
  
  <p>it must load the view function of the class called page.</p>
  
  <p>If I have a request to:</p>
  
  <pre><code>/page/test
  </code></pre>
  
  <p>it must load the view function of the class called page, with the parameter 'test'.
  This all works,</p>
  
  <p>But I want it to apply the RewriteRules <strong>ONLY</strong> if the request does <strong>NOT</strong> start with:</p>
  
  <pre><code>/THEMES/
  </code></pre>
  
  <p>So I can apply CSS styles etc...</p>
  
  <p>Can anyone help me? Thanks.</p>