I have a test.md file which contains some written texts and a composer.json the problem is when i typed test.md along with the url of my site, it gets downloaded. if i type composer.json appended to my url, it gets displayed. is there a way to prevent these two files from being downloaded or viewed by public ?
Asked
Active
Viewed 36 times
0
-
Do not set the document root of your web server to the directory containing your app, but to the public directory containing the static assets. See your web framework's documentation for details. – Michael Hampton Jan 13 '21 at 09:36
-
i'm not using a web framework, it's pure native code with no MVC structure or what...am thinking to use .htaccess , will this work? – sasori Jan 13 '21 at 09:38
-
Then make your own static assets directory. – Michael Hampton Jan 13 '21 at 09:42