A
A
AlexRas2018-09-04 16:31:49
Apache HTTP Server
AlexRas, 2018-09-04 16:31:49

How to allow access to only one directory via htaccess?

There is a directory with 4 files and 4 folders. It is necessary to prohibit access to all these files and folders except for one, it is called "folder". How can I do that?
This is how I get a 500 error:

Require all denied
<Directory "build">
  Require all granted
</Directory>

So everything is closed:
Require all denied
<Files "build">
  Require all granted
</Files>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dom Alfro, 2018-09-04
@mustang_shelby

Can be read from .htaccess documentation - access denied!
here is an example:
Order Deny,Allow
Deny from all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question