Zend framework digitalus的严格访问
安装digitalus后,我在根目录中创建了以下规则(.htaccess)文件Zend framework digitalus的严格访问,zend-framework,.htaccess,mod-rewrite,Zend Framework,.htaccess,Mod Rewrite,安装digitalus后,我在根目录中创建了以下规则(.htaccess)文件 <VirtualHost *:80> ServerName ecn.local DocumentRoot /home/speshu/Development/ecn SetEnv APPLICATION_ENV tinsae <Directory /home/speshu/Development/ecn> DirectoryIndex
<VirtualHost *:80>
ServerName ecn.local
DocumentRoot /home/speshu/Development/ecn
SetEnv APPLICATION_ENV tinsae
<Directory /home/speshu/Development/ecn>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerName ecn.local
DocumentRoot/home/speshu/Development/ecn
SetEnv应用程序_ENV tinsae
DirectoryIndex.php
允许超越所有
命令允许,拒绝
通融
并将127.0.0.1 ecn.local放入/etc/hosts中
但是,当我在文档根目录中键入或某些现有文件夹而不是显示“未找到”(404消息)时,它会列出其中的所有文件夹,我如何限制这一点
在五月份的早期项目中,我记得zend framework受到了这样的限制,digitalus的问题是什么,因为它是在同一个框架上构建的 无需在
digitalus中进行修改
只需将Options-index
添加到您想要的文件夹中,它就会隐藏文件(也称为“禁止消息”),如:
例如,如果需要隐藏库文件夹
只需在其中创建.htaccess
文件,然后写下选项-索引
它将完成以下工作:)但是你想用所有样式显示我的应用程序中的not found 404,因此………这种方式不会显示文件夹的内容,但所有样式和JavaScript仍然可以访问。我的意思是,我只想在页面的主内容区域显示错误,就像标准zend应用程序一样
Forbidden
You don't have permission to access /library on this server.