如何隐藏网站public_html文件夹中的文件夹? [英] How do you hide the folders in your websites public_html folder?
问题描述
如果您转到我网站上不包含.html文件的某些文件夹(该文件夹会列出其中的所有文件),我不满意.我不想访问它.例如: http://christianselig.com/css
I don't like how if you go to certain folders on my website that don't contain a .html file that it will list all the files in it. I don't want to give access to that. Such as: http://christianselig.com/css
如何隐藏这些?
推荐答案
如果您使用的是Apache Web服务器,并且可以访问httpd.conf,则可以为要隐藏内容的目录设置选项-索引". 如果您无权访问httpd.conf,则可以在目录中创建您要用"IndexIgnore *"隐藏的内容的.htaccess文件.
If you are using Apache webserver and have access to httpd.conf you can set "Options -Indexes" for directory which content you want to hide. If you have no access to httpd.conf you can create .htaccess file in directory which content you want to hide with "IndexIgnore *"
这篇关于如何隐藏网站public_html文件夹中的文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!