PHP头条
热点:

Kohana如何去掉URL中index.php


Kohana rewrite去掉URL中index.php教程:

第一步:打开bootstrap.php添加初始化配置'index_file' => FALSE

Kohana::init(array(
        'base_url'   => '/kohana/',
        'errors'     => TRUE,
        'index_file' => FALSE
));

第二步:直接将kohana中的example.htaccess改为.htaccess 即可,根据你的实际情况修改RewriteBase


RewriteEngine On
RewriteBase /kohana/

	Order Deny,Allow
	Deny From All

RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT]

 

www.phpzy.comtrue/phpkj/7950.htmlTechArticleKohana如何去掉URL中index.php Kohana rewrite去掉URL中index.php教程: 第一步:打开bootstrap.php添加初始化配置'index_file' => FALSE Kohana::init(array( 'base_url' => '/kohana/', 'errors' => TRUE, 'index_file' => FALSE))...

相关文章

相关频道:

PHP之友评论

今天推荐