apache - .htaccess:此处不允许使用位置

标签 apache web-applications apache-config httpserver

我收到此.htaccess的“此处不允许位置”错误。

有人对我该如何解决有任何想法吗?

<Files 'login'>
    AuthName NTLM
    AuthType NTLM
    NTLMAuth on
    NTLMAuthoritative on
    NTLMServer <censored>
    NTLMBackup <censored>
    NTLMLockfile <censored>
    require valid-user
    Satisfy all
</Files>
<Location /alarms/[0-9]+/acknowlege>
    Order deny,allow
    Deny from all
    Allow from localhost
</Location>

最佳答案

Location.htaccess中无效

看到:

  • http://httpd.apache.org/docs/2.2/mod/core.html#location
  • http://httpd.apache.org/docs/2.2/mod/core.html#files

  • 请注意Files怎么说,您可以在.htaccess中使用它,但是Location不...您需要将Location添加到服务器配置或虚拟主机中。

    关于apache - .htaccess:此处不允许使用位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6667894/

    相关文章:

    java - 使用 Apache tomcat 将项目分为两部分

    java - 我如何分析一个非常大的 Java webapp?

    apache-config - 如何 "reload"只有一个 vhost 文件

    WordPress 和 SEO : how to mask a path/pull content from another domain

    macos - "/etc/apache2/sites-available"的 mac 等价物是什么?

    apache - 在整个网站上启用 www + HTTPS

    apache - 如果找不到内容,则重定向到旧站点

    apache - 从 Apache 到 Wildfly 的 SSL 重定向

    加载相机应用程序后,iOS 8 网络应用程序屏幕缩小

    java - 在 GWT 中开发 Web 应用程序 (CRM)