What are some potential pitfalls when using mod_rewrite in PHP projects?

One potential pitfall when using mod_rewrite in PHP projects is creating infinite redirect loops. This can happen when the rewrite rules are not properly configured, leading to a continuous loop of redirects. To solve this issue, make sure to include conditions in your rewrite rules to prevent redirecting when the requested URL matches certain criteria.

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/index.php
RewriteRule ^(.*)$ /index.php [L]