Welcome Guest, Not a member yet? Register   Sign In
Possible fix for not working default_controller route
#1

[eluser]aguirre[/eluser]
I was really frustrated because default_controller did not work as expected. What fixed it for me was to remove an apparently faulty call to strtolower in system/core/Router.php in the second option of the ternary that checks for the a valid default_controller value.

I have found some other discussions on related topics, some even mentioned the problem of controller names being converted to lowercase. Be aware that I am using

Code:
$config['uri_protocol'] = "REQUEST_URI";

instead of "AUTO", which also seems to have difficulties.

If your installation also does not react to the default controller if you call simply call

http://yourproject.com/

try changing this in the system/core/Router.php

Original code (line 96):
Code:
$this->default_controller = ( ! isset($this->routes['default_controller']) OR $this->routes['default_controller'] == '') ? FALSE : strtolower($this->routes['default_controller']);

to

Code:
$this->default_controller = ( ! isset($this->routes['default_controller']) OR $this->routes['default_controller'] == '') ? FALSE : $this->routes['default_controller'];

Hope this saves some trouble for other people having the same problem. If the error is on my side and I failed to understand the docs or scheme of the uri routing please let me know.


best

aguirre
#2

[eluser]Reaven[/eluser]
Hi, it's my first message.

I have the same problem beause we work local on windows and the remote server have linux.

If you set the controller name with camelcase and the file, in windows works , but not in linux because have a case sensitive file system.

Sorry for me bad english Wink.




Theme © iAndrew 2016 - Forum software by © MyBB