I have a codeigniter application that i am trying to run via CLI but its not working. I used the example of codeigniter docs and I am using HMVC with no index.php on url.
I notice that the script via cli stop working after I removed index.php with .htaccess.
Any ideas on what might be the problem and how to solve it? Thank´s all of you guys for the help.
This is my htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
And my script
<?php
class Tools extends MX_Controller {
public function message($to = 'World')
{
echo "Hello {$to}!".PHP_EOL;
}
}
Now my script is located in application/modules/tools/controllers/Tools.php
So I run it on the terminal as follows
$ cd /path/to/project;
$ php index.php tools message