php - Codeigniter: 404 on existing controller -


when set $route['default_controller'] 'blog', ci opens controller without problems. when want access via url, ci returns 404.

my controller:

<?php defined('basepath') or exit('no direct script access allowed'); class blog extends ci_controller {      public function index()     {         echo 'hello world!';     } } 

saved @

application/controllers/blog.php

some other config things:

$route['default_controller'] = 'blog'; $route['404_override'] = ''; $config['base_url'] = ''; 

url try use:

http://localhost:63342/project/public_html/blog/

.htaccess hide index.php

rewriteengine on rewritecond $1 !^(index\.php|images|robots\.txt) rewriterule ^(.*)$ /index.php/$1 [l] 

how can fix issue? tried lot of solutions similar questions without success

if project in project folder in main directory of local server, change address to:

http://localhost:63342/project/blog 

you configured page default controller, should work by:

http://localhost:63342/project 

Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -