Very Basic URL Question

I just went through and cleaned up my models to be case sensitive (e.g., CoursePage.php and CoursePageController.php), with corresponding class names (CoursePage and CoursePageController).

This has messed up the URL management, and I know there is some rule that I’m missing. Going to /coursepage and /CoursePage and /coursePage do not work. (I have set up apache and a .htaccess to remove the index.php? notation.)

I haven’t been able to find a section in the docs that describes the rules for this behavior. The URL Management just talks about pattern changing, but doesn’t mention the implicit rules.

Any leads or explanations appreciated!

(Yii is fantastic, btw.)

Forgot to mention the first time that pages with simple class names work (e.g., Member and Content), and they work regardless of case in the URL.

You can configure CUrlManager::caseSensitive=false (default is true). By doing so, the controller id will be turned into lower case after request resolution. For this reason, you should name your CoursePage controller as CoursepageController instead of CoursePageController.

Thank you! Is there anything I can do to keep using CoursePageController, or do I have to change it?

You configure ‘controllerMap’ property of web application, which would allow you to use arbitrary controller class name. Otherwise, you have to follow the convention.

Okay. Thanks for the help! Good to know how/where it works.