Miten saan .htaccess tiedostot toimimaan?
Vaikka olen laittanut: /etc/apache2/apache2.conf tiedostoon "AllowOverride All"
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Niin silti tulee virheilmoitus:
/var/www/html/admin/.htaccess: AllowOverride not allowed here
Vaikka olen laittanut: /etc/apache2/apache2.conf tiedostoon "AllowOverride All"
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Niin silti tulee virheilmoitus:
/var/www/html/admin/.htaccess: AllowOverride not allowed here
Vastaukset 3
Vanhimmat
Pistä se eri kohtaan.
Mihin?
You must place the .htaccess file in the directory where you want it to take effect. For example if you want to use a .htaccess file to force authentication for http://www.example.com/admin, and your DocumentRoot is set to /var/www/html/www.example.com, you would place the .htaccess file in /var/www/html/www.example.com/admin .
https://wiki.apache.org/httpd/Htaccess