title: Conditional RewriteRule
body: <p>I need to do conditional RewriteRule in .htaccess.</p>
  
  <p>I have rule for JS files, and rule for other requests.</p>
  
  <pre><code># Rule for js files
  RewriteRule ^client/js/([A-Za-z0-9./]+)$ server/js.php
  
  #Rule for other requests
  RewriteRule (.*) server/controller.php
  </code></pre>
  
  <p>In that case of rule any request always go to controller.php. How to make rule logic something like this: </p>
  
  <pre><code>if (jsRule) {
     go_to_js_php();
  } else {
     go_to_default_controller():
  }
  </code></pre>