I would suggest that typical situations where you want to apply rewrite rules to subqueries more or less coincide with those where you used symbolic links inside your document root.
As a likely example, suppose you are using Server Side Includes and have a bunch of files scattered with suffixes such as .html , .shtml and .htm , and possibly some uppercase options. At some point, you decided to standardize the .html suffix and rename all your files accordingly. But you still have a bunch of legacy code and links that use other suffixes, and rooting them all will take some time.
In this case, you may need a rewrite rule as follows:
RewriteRule ^(.*)\.s?html?$ $1.html [NC]
By applying this also to subqueries, you guarantee that your server side will not break due to renaming.
source share