我想用密碼保護完整的/ var/www/html/*區域,但排除一個文件。 我想這個代碼:.htaccess文件沒有工作。
<Files *.*>
AuthType Basic
AuthName "Service-Login"
AuthUserFile /path/tomypasswdfile/...
Require valid-user
</Files>
<Files /index.alternetive.php>
#Order allow,deny
Require all granted
#Allow from All
#Allow from env=allow
#Satisfy any
</Files>
的登錄工作正常,但所有文件,包括「index.alternetive.php」 - 文件。
我的apache2在Ubuntu-Xenial上運行。
非常感謝