.htaccess RewriteCond %{REQUEST_FILENAME} !-d not working <p><code>.htaccess</code> code is,</p> <pre><code>RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^p/([A-Za-z0-9-_]+)/?$ redirect.php?url=$1 [NC,L] # RewriteRule ^[A-Za-z0-9-_]+/([A-Za-z0-9-_]+)/?$ product.php?seo_id=$1 [NC,L] # RewriteRule ^([A-Za-z0-9-_]+)/?$ catalog.php?seo_id=$1 [NC,L] # </code></pre> <p>I'm trying to access <code>http://example.com/directory/</code> which is already exist in server but i can't access it. There is no any error occuring but, if there is a request for already existant directory, rules after <code>RewriteCond %{REQUEST_FILENAME} !-d</code> should not be applied.</p> <p>But in this case one of the 3 rules are applying.</p> <p><code>RewriteCond %{REQUEST_FILENAME} !-d</code> is seems not working.</p>