How do I make the route for methods in a controller all stem from the root?
So If I have
/main/debates routes to /debates and /main, /main/questions routes to /questions automatically based on the method name.
According to the documentation I can define a route then define what I want it to be rewritten to, but when I do that, it doesn't work.
Putting $route['main/debates'] = 'debates'; or $route['main/questions'] = 'questions'; causes an error 404.
So If I have
Code:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Main extends MY_Controller {
public function debates(){
}
public function questions(){
}
public function index()
{
}
/main/debates routes to /debates and /main, /main/questions routes to /questions automatically based on the method name.
According to the documentation I can define a route then define what I want it to be rewritten to, but when I do that, it doesn't work.
Putting $route['main/debates'] = 'debates'; or $route['main/questions'] = 'questions'; causes an error 404.