What are some best practices for rewriting URLs in PHP using htaccess?

When rewriting URLs in PHP using htaccess, it is important to create clean and user-friendly URLs that are easy to read and understand. This can improve SEO and make your website more user-friendly. One best practice is to use htaccess to rewrite URLs to remove unnecessary parameters and make them more concise.

RewriteEngine On
RewriteRule ^about$ about.php [NC,L]
RewriteRule ^contact$ contact.php [NC,L]