Welcome Guest, Not a member yet? Register   Sign In
Setting clear URL on starter page
#2

[eluser]ciGR[/eluser]
in the routes.php file you can set the default controller, for example you have the <i>main</i>
Code:
class main extends Controller {
     function __construct()
     {
          parent::Controller();
     }

     function index()
     {

     }

     function home()
     {

     }
}

To remove the index.php you must use the .htaccess.
if ok with index.php removal and your default controller is main

when you try

www.site.com/ the result is the execution of the index method of the main controller.
For default when you not determine which method you want, the CI executes the index method.

If you want to execute the home method from the www.site.com/ instead www.site.com/home
you can add into the index method the
Code:
$this->home();
or change the routes.php.


Messages In This Thread
Setting clear URL on starter page - by El Forum - 03-27-2010, 08:45 AM
Setting clear URL on starter page - by El Forum - 03-27-2010, 09:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB