Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.htaccess : Location not allowed here

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>
like image 910
Pedro Rolo Avatar asked Jul 12 '11 16:07

Pedro Rolo


1 Answers

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.

like image 170
Sean Adkinson Avatar answered Nov 08 '22 17:11

Sean Adkinson