Questions about prohibiting direct access to files
Source: Internet
Author: User
The following is a problem about direct access to files: an excel file is generated in the background and stored in a/B/test.xls. I do not want others to directly enter http ://*. com/a/B/test.xls. I hope that authorized people can access it. if they do not have the permission, they will automatically run and run. what should I do? Prohibit direct access to files
As follows:
Generate an excel file in the background and place it in a/B/test.xls. I do not want others to directly enter http ://*. com/a/B/test.xls. I hope that authorized people can access it. if they do not have the permission, they will automatically run and run. what should I do? Share:
------ Solution --------------------
The simplest is to save it to a directory other than the web.
------ Solution --------------------
Add a. htaccess file to the same directory as the entry file.
------ Solution --------------------
Use apache permission authentication. Add permissions to this directory.
------ Solution --------------------
Set directory permissions in apache conf
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service