.htaccess身份验证500错误

时间:2014-12-15 16:32:31

标签: .htaccess password-protection internal-server-error

我的.htacess文件中出现以下500错误我无法弄清楚原因。 我用<?php echo $_SERVER["SCRIPT_FILENAME"]; ?>检查了路径 - 它&home / home / tedctcou / public_html / filename

任何人都可以看到为什么不起作用的原因?我在这里需要帮助......非常感谢!

AuthUserFile /home/tedctcou/public_html/.pswrd
AuthType Basic
AuthName "Information for committee and board members. Please enter your login details to access this information."

<Files "staff.php">
    Require valid-user
    Order deny,allow
    Deny from all

    Allow from 216.70.112.113
    Satisfy Any
</Files>

1 个答案:

答案 0 :(得分:1)

测试一下:

<FilesMatch "staff.php">
        Require valid-user
        Order deny,allow
        Deny from all
        AuthUserFile /home/tedctcou/.pswrd
        AuthType Basic
        AuthName "Information for committee and board members. Please enter your login details to access this information."
        Allow from 216.70.112.113
        Satisfy Any
    </FilesMatch>

移动你的.pswrd !!