I have this RewriteRule that works too well 🙂
RewriteRule ^([^/]*)/$ /script.html?id=$1 [L]
The bad thing about this rule is that it also matches physical directories which I don’t want.
How can I tell the mod_rewrite to ignore physical directories and apply the above rule only when the directory matched does not exist?
Take a look at RewriteCond. Put the following before your rule to exempt out directories and files