Setting clear URL on starter page |
[eluser]Ngulo[/eluser]
hi all my URL on starter page looks like this: www.asd.com/index.php/Home so i've defined Home as default controller when take away index.php the Url looks so: www.asd.com/Home but i was wondering, if i want my starterpage so: www.asd.com can't i take it?if i need always to define a default controller how can i make this url as my starter page's URL? sorry guys maybe i didn't understand completely URL on CI ![]()
[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 { 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(); |
Welcome Guest, Not a member yet? Register Sign In |