What are some potential pitfalls when setting up a redirection in PHP using htaccess?

One potential pitfall when setting up a redirection in PHP using htaccess is creating an infinite loop where the redirection continuously redirects to itself. To prevent this, you should check if the request is already being redirected before applying the redirection rule.

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/redirected-page.php
RewriteRule ^old-page\.php$ /redirected-page.php [L,R=301]