.htaccess文件允许访问图像文件夹查看图片? [英] .htaccess file to allow access to images folder to view pictures?
本文介绍了.htaccess文件允许访问图像文件夹查看图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个图像文件夹在下面的网址。
www.mysite.com/uploads/
在不同的页面:
www.mysite.com/search.php/
我想访问的图像,其中,有一个正确的标签链接,但是我得到的:
故宫
您没有权限访问/上传/在此服务器上。
所以我去了,并开始与一个的.htaccess
文件涉足的,我不知道我在做什么,我试图寻找一些文档,但没有运气,我即使采取了一个例子掀起另一question..Here是怎么我的的.htaccess
文件看起来大气压:
< FilesMatch&GT\(GIF | | JPE摹PNG?)$。;
订购允许,拒绝
所有允许
< / FilesMatch>
<目录/上传>
#所有的访问控制和认证被禁用
#此目录中
满足任何
所有允许
< /目录>
我怎么可以把它允许访问该文件夹的任何想法?
解决方案
<目录/上传>
选项+指标
...
I have an images folder at the following URL.
www.mysite.com/uploads/
On a different page:
www.mysite.com/search.php/
I am trying to access the images wherein, with a correct tag link, however I get the :
Forbidden
You don't have permission to access /uploads/ on this server.
So I went and started dabbling with a .htaccess
file, and I have no idea what I am doing ,I tried looking at some documentation but with no luck, I even took an example off another question..Here is how my .htaccess
file looks atm:
<FilesMatch "\.(gif|jpe?g|png)$">
Order allow,deny
Allow from all
</FilesMatch>
<Directory /uploads>
# All access controls and authentication are disabled
# in this directory
Satisfy Any
Allow from all
</Directory>
Any ideas on how I can have it allow access to that folder?
解决方案
<Directory /uploads>
Options +Indexes
...
这篇关于.htaccess文件允许访问图像文件夹查看图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文