2013-01-18 45 views
0

我嘗試在本地主機上使用Codeigniter和WAMP。 問題是,我可以在基本控制器中打開基本功能,並且當我嘗試使用根網站/控制器/功能時,它不起作用。結果是它讓我回到了wamp開始頁面,或者找不到頁面的文本。Codeigniter in localhost WAMP Windows

大多數情況下,我找到了關於製作.htaccess文件的解決方案,以及許多變化。 在wamp.conf文件中取消對rewrtie mod的註釋。並在我的網頁上留下index_page爲空。

但它不適合我。

我的控制器:

class Home extends CI_Controller { 

    function index() { 

      $this->load->view('index'); 
      } 

    function slide() { 

      $this->load->view('slider'); 
      } 
} 

而且我的網頁是:WWW/mysite的/ ....

回答

0

試試這個.htaccess

RewriteEngine on 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 

RewriteCond $1 !^(index\.php|indexcp\.php?|resources|robots\.txt) 
RewriteRule ^([A-Za-z0-9_/.-]+)$ index.php?$1 

RewriteRule ^(CSI) index.php?/CSI 
AddType text/x-component .htc 

編輯

在這裏添加上面的代碼

enter image description here

不要改變任何東西CI system ..

一旦選中此repo

+0

啊它不工作過。我有它在www /站點/文件夾。 –

+0

@ daniela.svas:設置$ config ['uri_protocol'] \t ='REQUEST_URI';'在配置 – mrsrinivas

+0

請確保它位於與index.php相同的文件夾中 – Jeemusu