在我的bootstrap.php
我有以下内容:
if($_SERVER['SERVER_NAME'] == 'localhost')
Kohana::$environment = 'development';
else
Kohana::$environment = 'production';
...
switch(Kohana::$environment)
{
case 'development':
$settings = array('base_url' => '/kohana/', 'index_file' => FALSE);
break;
default:
$settings = array('base_url' => '/', 'index_file' => FALSE);
break;
}
在.htaccess
有这个:
# Installation directory
RewriteBase /kohana/
这意味着如果我只是上传我的 kohana 应用程序,它会因为.htaccess
文件中的 RewriteBase 错误而中断。有没有一种方法可以让.htaccess
文件中的条件类似于我在引导程序中的条件,以便它使用正确的 RewriteBase?