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

前端 未结 7 1139
粉色の甜心
粉色の甜心 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 11:47

    According to this page you can do something like this

    Router::connect('/(.*).html', array('controller' => 'pages', 'action' => 'display'));

    but as you are talking about extensions, that may have other consequences.

提交回复
热议问题