In CodeIgniter, my url someurl.com/test/ will not execute anything inside the controller class. Please take a look and tell me if there's something you can think of that might prevent the execution of the CI_Controller here or where I should look.
For example the following
some.testurl.com/test/hi/Bob
some.testurl.com/test
some.testurl.com/test/hi
all show:
Above class
Below class
EDIT:
I believe my issue is with how I'm trying to run two separate applications. One is at testurl.com and the other is some.testurl.com where the directory for some.testurl.com is a subfolder of the directory where testurl.com is held. What's the right way to do this that they both work?
Update: Moving the subdomain outside the other CodeIgniter application's directory hasn't changed the behavior in any way. The CodeIgniter controller does not do anything.
Here's my code:
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
echo "Above class<br>";
class Test extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->model('mod_login');
$this->load->helper('date');
}
//443 replace with 482
function index() {
echo "Index function";
}
function hi($name)
{
echo "Hi".$name."!";
}
}
echo "Below class<br>";
?>
Here's my .htaccess file:
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|common|ico|database_backup|images|img|js|scripts|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
- Error reporting is enabled already and no errors are triggered. Environment is defined as development on the index file.