What are best practices for structuring and organizing .htaccess rules in PHP projects?

When structuring and organizing .htaccess rules in PHP projects, it is best practice to group related rules together, use comments to explain the purpose of each rule, and keep the file organized and easy to read. This helps in maintaining and troubleshooting the rules in the future.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress