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:
.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
Post a Comment