Codeigniter路由不适用于wamp服务器

时间:2013-10-11 09:50:36

标签: php apache .htaccess codeigniter mod-rewrite

类/方法/对象路由无法在wamp服务器上的codeigniter中工作,我能够在localhost / ci上加载视图,这是我为codeigniter提供的文件夹但是当我尝试加载方法localhost / ci / method时没有加载。

Please check here is my .htaccess
<IfModule mod_rewrite.c>

RewriteEngine On

# Set the rewritebase to your CI installation folder
RewriteBase /ci/


# Send everything to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

这是我的默认控制器,我能够在localhost / ci上加载视图,这是我为codeigniter设置的文件夹,但是当我尝试加载方法localhost / ci / method时,它没有加载。     

class Site extends CI_Controller {


    public function index()
    {
        $this->load->view('header');
        $this->load->view('style');
        $this->load->view('slider');
        $this->load->view('content');
        $this->load->view('footer');
    }
    public function aava(){

        $this->load->view('header');
        $this->load->view('style');``
        $this->load->view('slider');
        $this->load->view('content');
        $this->load->view('footer');
}

}

0 个答案:

没有答案