我尝试使用 .htaccess 对单个文件进行密码保护。但是,当访问该文件时,浏览器只会重定向到网站的主页。我的 webroot 上有 .htpasswd。我的 .htaccess 文件如下
<FilesMatch "result.php">
AuthName "Member Only"
AuthType Basic
AuthUserFile /home/username/.htpasswd
require valid-user
</FilesMatch>
我想保护文件 result.php。我已将用户名替换为我的确切 cpanel 用户名。请有人帮忙
<FilesMatch "results.php">
AuthName "Member Only"
AuthType Basic
AuthUserFile /home/username/public_html/.htpasswd
require valid-user
</FilesMatch>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)