Help, Page Not found |
[eluser]the_unforgiven[/eluser]
Please help me I have created a new controller, with corresponding views and model pages but still when I navigate to the page http://localhost/mcd/admin/sym is show page not found. See code below: I really could do with some help on this not sure why this is happening but sure some of you more advanced can point it out str8 away. Thanks in advance Code: <?php
[eluser]eggzy[/eluser]
shouldn't you extend CI_Controller not Controller? anyway I think the problem is view, $controller = $this->uri->segment(1); - this returns admin if I'm not wrong
[eluser]the_unforgiven[/eluser]
Yes it's an admin page for admin only so what should I do to rectify this problem??
[eluser]Aken[/eluser]
Have you already done the steps necessary to remove index.php from the URL structure? If not, you will have to access your page at http://localhost/index.php/mcd/admin/sym The problem is not in the controller's code, because as of right now it can't even find it (404 error). If you are using a recent version of CodeIgniter, you should extend CI_Controller as eggzy said.
[eluser]the_unforgiven[/eluser]
Yes index.php has been removed. htaccess also set up Code: Routes setup: Code: $config['index_page'] = "";
[eluser]the_unforgiven[/eluser]
The admin controller is a seperate file but yes and other pages work and I have only copied what I did previous but now for some reason is doesnt work this doesnt work either -> http://localhost/mcd/sym/admin just shows html page for frontend.
[eluser]the_unforgiven[/eluser]
Sorry guys just realised I had not adding in a new class in the model therefore this wasn't working but it's working now, my mistake but thanks to all for helping. |
Welcome Guest, Not a member yet? Register Sign In |