February 1, 2012, 10:18pm
I’ve created couple of controllers named
adminController, clientController, backendCMSController … etc.
after moving to live server, I’ve hidden the index.php and did the following in url manager.
When I tried to access those pages, adminController and clientController seems OK but backendCMSController didn’t load and showed a 404 error. I’ve tried upper case / lower case in url address bar but still showed 404 error. I looked at the log and that seems it was trying to load an action from default site controller.
However, when I removed the caseSensitive=>false then everything seems ok.
It’s definitely a bug, isn’t it?
don’t think so its a bug, but it is the way Yii handles that…when you set caseSensitive=>false, you have to rename your controller to
BackendcmsController (only first letter of controller name and "C" uppercased)
Qiang’s words (
February 2, 2012, 11:16am
I recently struggled with this and it appeared that the urlManager flag of caseSensitive=>false did not remedy the problem.
In the end, I had to rename the folders in views corresponding to the controller id to be camel case.
E.g. GenerateConfigurationController has an action called index. This should be represented in the file system as
where previously I had
I believe a user tried to raise a bug, but it was rejected as "invalid" see
I hope this helps somebody at some stage!
All the best,
February 2, 2012, 11:10pm
Case sensitive false does not apply to everything, except the routes.
So it really was invalid.
But thanks for the tip, John.