I have a problem with codeigniter routing. I can't understand at all, what's wrong. I have a rule in my routes.php file:
$route['multimedia/(:any:)'] = 'multimedia/$1';
$route['multimedia'] = 'multimedia/index';
So, if I go to http://mywebsite.com/multimedia
- all is works well , but if I go to http://mywebsite.com/multimedia/hello
I get 404 Error.
This is a part of my multimedia
controller:
<?php
class Multimedia extends CI_Controller {
public function __construct()
{
parent::__construct();
$this->load->model('multimedia_model');
$this->load->helper('language');
$this->load->helper('form');
}
public function index(){
//............This works
}
public function hello()
{
//..........This not works
}
}
The most strange thing to me, that I have another same rule in routes.php file,
$route['popup/(:any)'] = 'popup/$1';
$route['popup'] = 'popup/index';
which is works well when I go to mywebsite.com/popup
and mywebsite.com/popup/hello
Anybody, please, help me, what's wrong??