[eluser]benners[/eluser]
I've made some progress and it's nearly working ok. I've left the URL rewriting in the web.config to remove the index.php and my routes.php is
$route['default_controller'] = 'login';
$route['(.*)'] = 'login/$1';
mydomain/valid_user loads the correct view, but mydomain/invalid_user shows the index() instead of 404. Also mydomain/existing_function shows the index() instead of the valid function. Any ideas? Thanks.
Code:
public function _remap($user)
{
$user_info = $this->membership_model->get_member($user);
if(count($user_info) > 0){
// Display the user with the profile page.
$data['user_info'] = $user_info;
$data['main_content'] = 'profile_view';
$this->load->view('includes/template', $data);
}
else{
$this->index();
}
function index() {
}
function existing_function() {
}