I'm creating a .htaccess file having a fairly complex ruleset.

Among the fundamental spinning rules is first line:

If your asked for file is available physically, no spinning, stop processing rules.

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]

this utilizes one exception: After I access a directory having a trailing slash


directory won't be acknowledged as existant, whereas



So what can I actually do to create Apache recognize existing sites having a trailing slash too?

Background info, I'm already adding trailing slash to each request made with out them (to look after both /directory and /directory/ demands.

RewriteCond %{REQUEST_FILENAME} -d

The -d means directory. Also, based on http://stackoverflow.com/questions/286004/hidden-features-of-mod-rewrite , the [L] directive does not operate in .htacess files, just if putting it inside your apache conf files.

And if you just begin with:

RewriteEngine on
# Dont rewrite files or directories which actually exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

You are able to avoid spinning any existing files or sites. Your overall rules states "If this sounds like a genuine file, carry onInch whereas mine states "If it is not really a real file and it is not really a real directory, carry on.Inch