[eluser]a&w[/eluser]
Since I can't use MY_Controller as a front controller I have been attempting to use:
applications/controllers/default_controller.php
Code:
class Default_Controller extends Controller
{
function Default_Controller()
{
debugBreak();
parent::Controller();
}
function _remap($page, $content = '', $title = '')
{
$method = $this->uri->rsegment(2);
$value = $this->uri->rsegment(3);
//do stuff
}
coupled with this
.htaccess file
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/default_controller/$1 [L]
Works ok, unless I enter my controller name directly, say: mysite/welcome
Which routes me directly to my controller
without going through the default_controller. I was thinking to use _remap in that default_controller and have it be the entry point for the site.
I understand that one of the advertised perks is that you can hit any module controller directly via a url, but following one of the earlier suggestions I was trying to funnel all requests through the default_controller.
Any ideas what I'm doing wrong?