A
A
Alexey2016-02-15 12:03:08
Apache HTTP Server
Alexey, 2016-02-15 12:03:08

How to deny access to a directory on the entire server?

Hello! There are a lot of directories on the server, their paths are something like this (different):

/uploads/files/1/art/
/uploads/post/art/
/uploads/files/2/art/
/uploads/post/25/art/

And so on.... They are created automatically as news is added to the site. Maybe somehow it is possible to deny access to all directories with the name " art " and to all files from the root .htaccess file, but so that php scripts can access them to add, say, to a backup?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kolossradosskiy, 2016-02-15
@dzheka3d

<Directory  ~ "art">
  Order deny,allow
  Deny from all
  Allow from localhost
</Directory>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question