'How to deny access to specific document types in LAMP
I am conducting a test run of my concept control web panel project on Centos7 using LAMP. However, I am experiencing a bit of a problem. When I visit http://mywebsiteurl.com/users.db rather than say forbidden or display a blank page. The browser auto downloads the .db file. How can I prevent this from happening. Is there a way to restrict access to files with a particular extension?
Solution 1:[1]
Okay so after hours of research, trial and error. I somehow managed to fix my problem using the solution found here:
https://stackoverflow.com/a/5605110/18351396
I just changed the file extension to .db to suit my case.
Thanks everyone, especially CBroe.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nathan Alden |
