Welcome Guest, Not a member yet? Register   Sign In
routes doesn't work
#1

(This post was last modified: 05-04-2015, 05:36 AM by casa.)

Hello,
this is my configuration file (config.php)
PHP Code:
$config['base_url']= '';
$config['index_page'] = 'index.php';
$config['uri_protocol']    = 'REQUEST_URI';
$config['url_suffix'] = ''

this is my routes file routes.php
PHP Code:
$route['default_controller'] = 'connexion/login/index' // i try connexion/Login/index and doesn't work 
/* with for example 'defaut' located in directory 'controller' is working. But with above not.... */
$route['404_override'] = 'erreur404';
$route['translate_uri_dashes'] = FALSE

My url to access to my application is for example 'localhost/ci3' and i want to be redirected on controller login located in 'controller/connexion/Login.php' and used 'index()' method of this controller.


My controller "Login" is located in directory 'controller/connexion'.
With this configuration, controller error404 print me my error whereas if i use the controller 'defaut' located in directory 'controller', that works.
Can you help me please ?
I try  with apache configuration to load module rewrite or not, to put $config['index_page'] = '' or $config['base_url']= 'localhost/ci3'; or mix the two but nothing works.
My .htaccess is the htacess of Ci3, that is to say
PHP Code:
<IfModule authz_core_module>
 
   Require all denied
</IfModule>
<
IfModule !authz_core_module>
 
   Deny from all
</IfModule
Thanks
Reply
#2

The default_controller uses a "controller/method" format, you can't put a directory in it.
Reply
#3

Thanks you. I will change the location of my default_controller and put it like 'defaut.php'.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB