I've been trying to figure this out for two hours, and I give up. I want to externally redirect about.php to about/, and also have about/ internally redirect to about.phpRewriteRule ^about/$ /test/about.php [L]    RewriteRule ^about\.php$ /test/about/ [R,L]Both of these rules work fine by themselves, but when they're combined they cause an endless loop (since each rule undoes the other one).How can I combine them without causing an endless loop?EDIT: In the related tab it shows a question that's exactly the same as this that I just couldn't seem to find myself through Google, and the solution works perfectly:Using a .htaccess to RewriteRule and Redirect 301 at the same time?This:RewriteRule ^about/$ /test/about.php [L,E=CLEAN_CONTACT_URL:1]RewriteCond %{ENV:REDIRECT_CLEAN_CONTACT_URL} !1RewriteRule ^about\.php$ /test/about/ [R=301,L]works exactly the way that I wanted, I just didn't know how to use RewriteCond to do something like this. Now I'm glad I posted my question!
Using htaccess to internally and externally redirect a page at the same time
htaccess;redirects;trailing slash;file extension