AnNaMaLaI
AnNaMaLaI

Reputation: 4084

Is it good to pass CamelCase controller name in Cakephp URL?

Sorry for this basic question

I have a controller named "UserProfiles" it contain a function named "view". But when a user login i redirecting to that view method. I using the following code : 1.) $this->redirect('/UserProfiles/view'); and i have other option 2.) $this->redirect('/user_profiles/view');

My Output: http://www.sample.com/UserProfiles/view Or http://www.sample.com/user_profiles/view

My doubt is which is correct standard to use in cakephp, and which of these 2 option will helpful for SEO friendly url ?

Upvotes: 2

Views: 1087

Answers (1)

thomasfedb
thomasfedb

Reputation: 5983

The CakePHP convention is that you use underscored and lowercase in your urls.

See: http://book.cakephp.org/view/904/Controller-Conventions#URL-Considerations-for-Controller-Names-905

Upvotes: 2

Related Questions