A
A
Andrew2018-02-05 15:47:19
Apache HTTP Server
Andrew, 2018-02-05 15:47:19

If access is denied via .htaccess using .htpasswd, then how to allow access without a password to a specific folder?

Hello. My domain is denied access with

<Files .htpasswd>
    deny from all
</Files>

But there is a need to allow read access without a password to a specific folder and all subfolders. Tell me, please, is it possible to do this? And if so, how?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Megas, 2018-03-06
@ntzch

Like this:

Authtype Basic
AuthName "Test server"
AuthUserFile /xxxx/.htpasswd
Require expr %{REQUEST_URI} =~ m#^/openpath/.*#
Require valid-user

All paths that start with /openpath/ will be opened without a password.

V
Viktor Taran, 2018-02-05
@shambler81

put in this folder .htaccess
it interrupts the rights of the parent and inherits.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question