What are the best practices for setting up mod rewrite in PHP to avoid displaying incorrect content?

When setting up mod rewrite in PHP, it is important to ensure that the rewrite rules are correctly configured to avoid displaying incorrect content. One way to do this is to use specific conditions in the rewrite rules to accurately match the URLs being rewritten. This can help prevent unintended rewriting of URLs and displaying incorrect content.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]