What potential pitfalls should be considered when using mod_rewrite in PHP for URL rewriting?

One potential pitfall when using mod_rewrite in PHP for URL rewriting is creating infinite loops or redirect chains, which can lead to performance issues or browser errors. To avoid this, it's important to carefully define rewrite rules and conditions to ensure that the redirection logic is clear and does not inadvertently trigger multiple redirects.

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