htaccess 500内部服务器错误

时间:2013-11-26 17:08:40

标签: apache .htaccess http-authentication

好吧所以我在使用htaccess密码保护页面时遇到问题。每次我导航到页面时,他们都会被重定向到“内部服务器错误”页面。我对PHP知之甚少,并且很难解决这个问题。我查看了错误日志,发现此错误“[错误] [客户端209.91.179.158]客户端被服务器配置拒绝:”

我不知道如何访问FTP服务器上的httpd.conf文件,也不知道是否可以。我只使用PHP大约2周。

我的.htaccess文件

<Directory>
   Order allow,deny
   Allow from all
   Allow from 209.91.179.158
   Allow from ::1
</Directory>
AuthType Basic  
AuthName "restricted area"  
AuthUserFile mydir/.htpasswd
<Files "staff.html">
  Require valid-user
</Files>

1 个答案:

答案 0 :(得分:1)

您收到500错误,因为<Directory>中不允许.htaccess指令。如果你能解释你想要做什么,我可以帮助你。

相关问题