Answer the question
In order to leave comments, you need to log in
How to prohibit access (archive download) by url?
I rummaged through Google, took a lot of examples, it didn’t help (Even some authors of the posts themselves didn’t help, judging by the comments, or I’m doing something wrong). This means that there is a docs.zip archive in the site directory. If you follow the link domain/docs.zip, the archive is automatically downloaded. But I would like to disable it. I saw it was written on one of the sites - to place the archive outside the site directories, but the question is, how then to issue this file to certain users?
For example, I tried to use this code in .htaccess:
< Files "docs.zip" >
deny from all
</ Files >
As a result, there is no result
Answer the question
In order to leave comments, you need to log in
<FilesMatch regex>
Deny from all
</FilesMatch>
<Files regex>
Order Deny,Allow
Deny From All
</Files>
How to prohibit access (archive download) by url?
how then to issue this file to certain users?
полодите архив под .htpass и скачивате его с урлом указав пароль, в таком случае физически файл не возможно будет скачать только со ссылкой логина и пароля.
это самое простое решение.
Второе решение это скачивание файла через php генерацию урла.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question