title: RewriteCond to skip rule if file or directory exists
body: <p>I am trying to adjust my htacess file to skip the rewrite rule if the file or directory exists, but when the file exists, it changes the URL to something different. I don't know why this is happening. Here is my htaccess file:</p>
  
  <pre><code>RewriteEngine On
  
  RewriteCond %{REQUEST_FILENAME} !-f [OR]
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^project/([^/\.]+)/?$ index.php?view=project&amp;project=$1 [L]
  RewriteRule ^for/content/ag index.php?view=opening&amp;section=ag [L]
  RewriteRule ^for/content/bus index.php?view=opening&amp;section=bus [L]
  RewriteRule ^for/content/fcs index.php?view=opening&amp;section=fcs [L]
  RewriteRule ^for/content/market index.php?view=opening&amp;section=market [L]
  RewriteRule ^for/content/trade index.php?view=opening&amp;section=trade [L]
  RewriteRule ^for/content/teched index.php?view=opening&amp;section=teched [L]
  RewriteRule ^for/content/([^/\.]+)/?$ index.php?view=content_area&amp;section=$1 [L]
  </code></pre>
  
  <p>The directory /project/nti exists, with an index.php file. When the address mywebsite.com/folder/project/nti is entered, it changes to mywebsite.com/folder/project/nti/?view=project&amp;project=nti. I am applying this on a test server where the sample site is in a subfolder, but when implemented, it will be in the root web server folder.</p>
  
  <p>Thanks for any help!</p>