What are some best practices for organizing and structuring rewrite rules in PHP for a large website?

When dealing with rewrite rules in PHP for a large website, it is important to organize and structure them in a clear and efficient manner to ensure readability and maintainability. One best practice is to group related rules together based on their functionality or purpose. Additionally, using comments to document each rule can help in understanding their intended purpose and function.

// Grouping rules for specific functionalities
RewriteRule ^about$ about.php [L]
RewriteRule ^contact$ contact.php [L]

// Redirecting old URLs to new ones
RewriteRule ^old-url$ new-url [R=301,L]