Apache: the limits of .htaccess
.htaccess is practical: one file per directory, no restart, the shared hosting client manages it alone. On a dedicated server, it is a slowdown.
Every HTTP request makes Apache read all the .htaccess files in the path, from the root. For /var/www/site/blog/article/, Apache reads /var/www/.htaccess, /var/www/site/.htaccess, /var/www/site/blog/.htaccess and /var/www/site/blog/article/.htaccess. Four disk reads per request before serving the page.
The fix: AllowOverride None in httpd.conf and everything that was in the .htaccess files moves to the VirtualHost. Apache no longer reads .htaccess files and the directives are compiled at startup.
The gain: measured on a WordPress server with 3 levels of .htaccess, the per-request latency went from 14 ms to 8 ms. The rest of the difference is opcode cache.
The .htaccess limits that remain valid even in shared hosting: php_value and php_flag only work with mod_php (not in FastCGI/FCGI), RewriteRule is slower than Alias and AllowOverride All exposes directives that can crash Apache.
[edit: 2026] AllowOverride None is the default in Apache 2.4+. .htaccess remains a legitimate shared hosting tool, but the debate has evolved: modern servers (nginx, Caddy) have no .htaccess concept at all. The philosophy has moved from “everything in config” to “everything in code” (Docker, IaC). .htaccess survives because shared hosting survives.