希望你是东好。关于使用.htaccess文件
我在我的public_html文件夹中有一个子文件夹。 在子文件夹中,我用下面的代码.htaccess文件:
# Disable indexing:
Options All -Indexes
# Ignore every file:
IndexIgnore *
# Prevent access to any file:
<FilesMatch "^.*$">
Order Allow,Deny
Deny from all
</FilesMatch>
现在,当我浏览到子文件夹,例如,www.mysite.com/subfolder/myfile.php,I所示我的网站的index.html页面! 这真的可以发生吗?!
有人可以告诉我我需要做什么来显示一个通用的“访问不被允许”页面?
在此先感谢您的帮助。
您在网站的文档根目录中是否有_another_'.htaccess'文件?这个'.htaccess'似乎不成问题。 – lanzz
你是对的,刚刚在我的public_html文件夹(由Drupal创建)中找到另一个.htacess文件,它显示了index.html页面。 –