Welcome Guest, Not a member yet? Register   Sign In
routes.php in HMVC not working
#1

[eluser]Unknown[/eluser]
Hi everyone, I have created a administration module, if i type
Quote:http://localhost/administration/login
, its succesful redirecting to the administration module and loading the login controller, but now i want to define the login controller as the default controller, that way if i type
Quote:http://localhost/administration
the login method should be loaded.

I know that its posible to have the same application folder structure within the module folder, so i have created a config folder and within it a routes.php file whit this content:
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$route['default_controller'] = 'login';
$route['404_override'] = '';

But this is not working, what i a missing ?
#2

[eluser]wiredesignz[/eluser]
This is described in the Modular Extensions - HMVC documentation.
Quote:Each module may contain a config/routes.php file where routing and a default controller can be defined for that module using:
Code:
$route['module_name'] = 'controller_name';

ie: {modules}/administration/config/routes.php
Code:
$route['administration'] = 'login';
#3

[eluser]Unknown[/eluser]
Thanks, now it works as expected.




Theme © iAndrew 2016 - Forum software by © MyBB