.htaccess : Location not allowed here

寵の児 提交于 2019-12-05 12:30:55

问题


I am getting a "Location not allowed here" error with this .htaccess.

Does anyone have any idea on how I should fix this?

<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>

回答1:


Location isn't valid in .htaccess

See:

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

Notice how Files says that you can have it in .htaccess, but Location doesn't... You'll need to add your Location to either the server config or a virtual host.



来源:https://stackoverflow.com/questions/6667894/htaccess-location-not-allowed-here

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!