title: .htaccess rewrite regex: match anything but "index"
body: <p>I'm trying to create a rule used in a .htaccess file to match <strong>anything but</strong> a particular string, in this case: <code>index</code>.</p>
  
  <p>I thought that it should be possible to match this special string first and use <code>[L]</code> but that's not working,<br>
  and it should be possible using the following regex, but it causes a 500 error.</p>
  
  <p>I want to match:</p>
  
  <ul>
  <li>pagename1</li>
  <li>pagename2/whatever</li>
  <li>pagename3/234/whatever</li>
  <li>about</li>
  <li>contact-us</li>
  <li>(etc)</li>
  </ul>
  
  <p>but not</p>
  
  <ul>
  <li>index/123</li>
  <li>index/124/whatever</li>
  </ul>
  
  <p>(BTW "index" is the name of a file with no extension, not my choice, this is a work thing)</p>
  
  <pre><code>^(?!index)[\w/\-]+
  </code></pre>
  
  <p>I assume that apache's implementation of regex doesn't cope with the <code>(?!xxx)</code> rule.</p>
  
  <p>Any help/suggestions will be much appreciated. </p>