开发者

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

Sorry for this basic question

I have a c开发者_StackOverflow中文版ontroller 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 ?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜