I'm having some problems learning how to program proper URLs in codeigniter ... im finding that controller names cant have hyphens, only underscores.
Ill tell you the process in doing, and if someone could let me know where im going wrong, that would be great.
Ok, im my view I have a button that links to a page, for example about_us
.
<a href="<?php echo base_url().'about_us'; ?>">About Us</a>
This then loads the about_us.php controller, inside the controller i have
$this->load->view('about_us');
That then loads about_us.php in the view and shows the page.
I have found that it doesnt have a problem with underscores, but I want to use hyphens for URLs instead of underscores.
When I try and call a controller about-us.php
it doesnt work, when I rename the class header class About-us extends Controller { it doesnt work :S
I'm really confused how to get good looking URLs.
Any advice would be grand.
Cheers