I have a website on a local wamp server (I have used a virtual host setup). However when I try to link to another controller on the site, I just get a 404 page (not codeigniters 404). I'm sure I'm missing something simple, but what I'm not quite sure.
If in the url I put the website.co.uk/index.php/aboutus I get the page (although it's not got any of my formatting there).
I'm trying to have links in the format: website.co.uk/aboutus
Here is my routes.php
$route['404_override'] = '';
$route['default_controller'] = 'home';
$route['(:any)'] = '$1';
Here is my controller that I'm trying to link to:
class Aboutus extends CI_Controller {
public function index()
{
// $this->load->library('parser');
// $this->load->view('header_view');
// $this->loadContent();
// $this->load->view('footer_view');
$this->load->helper(array('form', 'url'));
$data = array();
$data["title"] = "Our Story";
$data["page_content"] = "here is some page content";
$this->load->view('aboutus_view', $data);
}
}
I am using the follow href tag for the link
<a href="<?php echo site_url('aboutus'); ?> ">
In my config file I have
$config['base_url'] = '';
$config['index_page'] = '';
Has anyone got any ideas as to what I'm missing?
Thank you.