PHP Kohana.Htaccess似乎阻止访问子文件夹


PHP Kohana. Htaccess seems to be preventing access to subfolder.

我在一个网站上遇到了一个问题,因为我的htaccess文件(位于web根目录中)似乎阻止了对子目录中任何php文件的访问。我已经通过创建一个新的测试文件夹并向其中添加一个php文件进行了测试,该文件可以进行简单的回显。我总是出错500。

这个问题最近才开始出现。我的htaccess规则与我在自己的服务器上运行的许多其他网站相同,但这一个网站由不同的公司托管。有人知道为什么会发生这种事吗?服务器上的更改可能导致了这种情况吗?

这是我的htaccess文件:

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>
# Turn on URL rewriting
RewriteEngine On
# Put your installation directory here:
# If your URL is www.example.com/kohana/, use /kohana/
# If your URL is www.example.com/, use /
RewriteBase /
# Protect application and system files from being viewed
RewriteCond $1 ^(app_admin|app_public|system)
# Rewrite to index.php/access_denied/URL
RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L]
# Do not enable rewriting for other files that exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite to index.php/URL
RewriteRule ^(.*)$ index.php/$1 [PT,L]
Options -Indexes

请参阅ServerFault中的讨论。这绝对是一个权限问题。根据上述讨论,请确保父文件夹也具有适当的权限,否则Apache无法进入带有.htaccess文件的文件夹进行读取。