Description
In Configuring a Web Server page, Adding Rewrite Rules section, a tip says "A performance improvement can be achieved by moving the rewrite rules from the .htaccess file into the VirtualHost block of your Apache configuration".
I experienced the same issue as symfony/recipes-contrib#422, that is: if one simply moves .htaccess
directives as direct children of the <VirtualHost>
block, it won't work. They need to be nested into a <Directory>
block for the DocumentRoot of the VirtualHost.
I lost a precious couple of hours because of ignoring this. I would have loved finding that issue much earlier, but to make it harder, all my files in DocumentRoot except index.php
were symlinked, so I thought it was an issue about Apache Rewrite mod and symlinks.
So IMO the doc should either be more clear, specifying the Directory context requirement (preferred), or not saying that half-working tip at all. (I may create a PR if agreed)