How can I append .html to all my URLs in cakephp?

前端 未结 7 1136
粉色の甜心
粉色の甜心 2020-12-19 11:18

I am using cakephp in one of my projects and my client wants the site URLs to end with .html and not the usual friendly urls. I was wondering if its possible in cakephp to d

7条回答
  •  自闭症患者
    2020-12-19 12:01

    As Routes Configuration - File extensions documentation section says, you could use:

    Router::parseExtensions('html', 'rss');
    

    This will tell the router to remove any matching file extensions, and then parse what remains.

提交回复
热议问题