Question
Cannot enable the use of .htaccess files - No results
(Previous issue solved - A new issue has arisen)
1. I create a .htaccess file at var/www/html:
AuthUserFile /etc/htaccess/.htpasswd
AuthName "Authorization Required"
AuthType Basic
require valid-user
2. I enable the use of .htaccess files at /etc/apache2/sites-available/default-ssl.conf
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
3. Now, I create an .htaccess file at var/www/html/site:
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/site/index.php [L]
4. So now, a URL that was previously located at http://www.example.com/site/index.php/Bool can now be accessed via http://www.example.com/Bool.
5. However, all of this set up produces nothing - .htaccess files do not work.
What’s wrong here? These the setup shown in point 3 worked on my old host.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×