开发者

Deny direct URL request to files in specific folder

开发者 https://www.devze.com 2022-12-24 22:40 出处:网络
Hi there just wondering; How do I deny direct access to files in a specific folder. I have an upload script that uploads to /uploadedFiles and currently I just have an index.php which redirects the u

Hi there just wondering;

How do I deny direct access to files in a specific folder. I have an upload script that uploads to /uploadedFiles and currently I just have an index.php which redirects the user to the login开发者_C百科 page. However, how do I stop users from accessing a file directly such as:

/uploadedFiles/thisFile.jpeg

Thanks in advance :)


If you do not want your files to be accessed via the webinterface, add a .htaccess file with the following content:

Order deny,allow
Deny from all
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号