• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
404 error for controller

[eluser]Wonder Woman[/eluser]

I hope someone can help. I have a controller called news and I just want to display the index function page but it throws a 404 error...the edit one works perfectly. I have two other controllers and they both work with the same code...

So if I go to "..admin/news" it doesn't work but if I do "..admin/news/edit/1" it works??

class News extends CI_Controller {

   function __construct()

   function index()

   function edit()
      // other code is in here but this works fine

If you could help me out that would be great, thanks.

Do you happen to have an admin controller?

is admin/news/index working?

[eluser]Wonder Woman[/eluser]
Ooh yes admin/news/index is working...how do I fix this? Thanks for a speedy response btw Smile

[eluser]Wonder Woman[/eluser]
I think I have found the problem! I looked in my routes.php file and found this line which I forgot to delete:

$route['admin/news'] = 'admin/news_manager/index';

And I do have an admin controller, thanks for bringing it to my attention, I wouldn't have checked my routes.php file otherwise Smile

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.