首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

kohana根本安装配置

2013-01-17 
kohana基本安装配置首先编辑 bootstrap 文件。查找 bootstrap 文件中的 Kohana::init 这一行,并且在下面增

kohana基本安装配置

首先编辑 bootstrap 文件。查找 bootstrap 文件中的 Kohana::init 这一行,并且在下面增加 index_file 参数:

  Kohana::init(array(

      'base_url'    => '/blog', // 如果你需要的话,你要编辑这个!

      'index_file'=> '',

  ));

你还需要在 .htaccess 文件中改变一行。

重命名 example.htaccess 文件为 .htaccess 并且更改下面这行代码:

  RewriteBase /kohana/

修改为和 bootstrap 文件中的 base_url 一样。如果你的 Kohana 安装在如 example.com/blog/ 的位置,那么就修改为:

  RewriteBase /blog/



检修#1

如果无法工作(出现“interval Server Error” 或者 “No inputFile Specified”)请尝试修改:

RewriteRule^(?:application|modules|system)\b - [F,L]

RewriteRule^(application|modules|system)/ - [F,L]

还有修改

RewriteRule.* index.php/$0 [PT]

RewriteRule.* index.php [L]



检修#2

如果仍然无法正常使用,请确定 .htaccess 文件是否在 httpd.conf ,或者在extra/文件夹config中被允许启用(然后重启 Apache)

      <Directory"/var/www/html/example.com/blog">

      Order allow,deny

      Allow from all

      AllowOverride All

     </Directory>


热点排行