When using the Apache web server, .htaccess
files (also called “distributed configuration files”) are used to specify configuration on a per-directory basis, or more generally to modify the behavior of the Apache web server without having to access virtual hosts files directly (this is usually impossible for example, on shared hosts). For these .htaccess
files to have any effect, we must first enable the pertinent setting in the Apache configuration.
This is a companion discussion topic for the original entry at https://linuxconfig.org/enable-htaccess-on-apache-2-linux-server