In looking through the TodoList example that comes with NetBeans I noticed that they have the same .htaccess file in every single directory. Why would one want to do this approach rather than placing everything in a directory with a single .htaccess that covers all contained subdirectories?
In looking through the TodoList example that comes with NetBeans I noticed that they
Share
It depends on the approach. If you have one site that’s monolithic, as in everything is more or less in one place, then having a single htaccess file in your document root is probably the best approach. When your site is modular or where each directory is sort of its own “webapp”, having htaccess files in each of these directories means you can move them around, put them in other folders, or organize them however you want and not have to worry about changing things in a single htaccess file in the document root. This makes it more portable, but you’d only really care about that if your site is designed that way.