Error 404 not found with .htaccess in folder on XAMPP/Apache -


i have test server xampp (apache/php/mysql) running on windows server 2003.

i used without problems .htaccess , .htpasswd files. on site i'm working on error 404 (yes! not 403) when trying open file inside directory protected .htaccess, looks like:

<files .htaccess> order allow,deny deny </files>  authname "area riservata" authuserfile \web\test\keys\.htpasswd authtype basic require valid-user 

i changed .htpasswd directory same of .htaccess (\web\test\public_html\admin\.htaccess) file without success!

if remove file works fine: apache logs , error logs nothing.

where problem/error?

edit

on document_root (\web\test\public_html\) have .htaccess file. discovered when commenting last line (as following - no redirect index.php non file , symlinks) problem disappear. don't understand why!

 rewriteengine on  rewritecond %{request_uri} ^/(it|de|fr|en)/(.*)$ [nc]  rewritecond %{document_root}/multi_html/%2 -s  rewriterule ^(it|de|fr|en)/(.*)$ /multi_html/$2?lingua=$1 [nc,l,qsa]   rewritecond %{request_filename} !-l  rewritecond %{request_filename} !-s #rewriterule . index.php [nc,l] 

i found myself answer:

authname "authorisation required" authuserfile "\web\test\keys\.htpasswd" authtype basic require valid-user errordocument 401 "authorisation required"   <-- add line 

apache had changed , specifying 401 error document necessary apache looking when using .htpasswd.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -