2017-04-18 83 views
0

你好全部是新來的CodeIgniter我已經開發的應用程序,並上傳到服務器,我不能訪問默認控制器幫助我解決it.This是我的鏈接無法訪問默認控制器代碼點火器

http://www.digitalmarketingbangalore.in/demobox/koooly

的config.php

$config['base_url'] = 'http://www.digitalmarketingbangalore.in/demobox/koooly'; 
$config['index_page'] = ''; 

routes.php文件

$route['default_controller'] = 'user'; 

$route['404_override'] = ''; 
$route['translate_uri_dashes'] = TRUE; 
$route['admin'] = 'admin/dashboard'; 

控制器:用戶

<?php 
    defined('BASEPATH') OR exit('No direct script access allowed'); 

    class User extends CI_Controller { 


      public function index() 
      { 
        $this->load->view('login'); 
      } 

} 


?> 

htaccess的

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteCond $1 !^(index\.php|images|asset|robots\.txt) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?/$1 [L] 
</IfModule> 
+0

什麼錯誤的故事嗎? –

+0

我認爲問題與.htacess。請檢查或編輯帖子。 –

+1

http://www.digitalmarketingbangalore.in/demobox/koooly/index.php/user/使用此工作 –

回答

0

htaccess的添加在下面位置

/demobox/koooly/

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteCond $1 !^(index\.php|images|asset|robots\.txt) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?/$1 [L] 
</IfModule> 

和配置/ config.php中 變化低於

$config['base_url'] = 'http://www.digitalmarketingbangalore.in/demobox/koooly'; 
$config['index_page'] = ''; 
+0

仍然相同404頁未找到 –

+0

you remove index .php在config.php中? –

+0

也加入.htaccess ?? –

0

更新你的配置看起來像這樣

$config['base_url'] = 'http://www.digitalmarketingbangalore.in/demobox/koooly/';