我有一个在 web 根目录中运行的 Kohana 应用程序,一切正常。但是当我尝试使用非 kohana PHP 代码将子文件夹添加到根目录时,我无法访问它。Kohana 仍然试图找到文件的路径..
例子:
- public_html
- 应用
- 模块
- 子文件夹
- 索引.php
- 测试.html
如果我尝试访问 /subfolder,我会收到以下错误:
类 controller_subfolder 不存在
但是,如果我尝试访问 /subfolder/test.html 它工作正常。
我的 .htaccess 文件是默认的:
# Turn on URL rewriting RewriteEngine On # Installation directory RewriteBase / # Protect hidden files from being viewed <Files .*> Order Deny,Allow Deny From All </Files> # Protect application and system files from being viewed RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L] # Allow any files or directories that exist to be displayed directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Rewrite all other URLs to index.php/URL RewriteRule .* index.php/$0 [PT]