本文介绍了拒绝用户访问文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这个上传文件结构链接localhost:58707/uploads/interaction/5/Chrysanthemum.jpg
I have this upload file structure link localhost:58707/uploads/interaction/5/Chrysanthemum.jpg
我想拒绝所有用户直接访问〜/上载".
I want to deny all the users to access '~/uploads' directly..
因此,我将其放在web.config中,就像我在其他问题中看到的那样:
So, I put this in my web.config as I see in others questions here:
<location path="~/uploads"> //I've tried '/upload' and 'upload' too.
<system.webServer>
<directoryBrowse enabled="false" />
</system.webServer>
</location>
但是它不起作用.我该怎么办?
But it doesn't work. How can I do this?
推荐答案
选中此答案..
也
这篇关于拒绝用户访问文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!