【发布时间】:2014-05-20 16:36:18
【问题描述】:
我的项目结构是:
-application
-lib
-public
-index.php
-.htaccess
.htaccess 现在是:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]
我需要限制对除 public 和 index.php 文件之外的所有文件夹的访问。怎么做?
我尝试将Deny all 添加到我的.htaccess 和Allow all 到public 文件夹中,但是我的index.php 变得无法访问。
【问题讨论】: