开发者

CakePHP route '/*' breaking access to subfolders

I'm just starting with CakePHP and I have a question.

The idea is to have URLs like this:

domain.tld/some-title-of-a-page

...and it should open "page" controller with "show" action and some-title-of-a-page as a parameter. What I did in routes.php is:

Router::connect('/*', array('control开发者_如何学JAVAler' => 'page', 'action' => 'show'));

The problem is that I'm unable to read my /css/layout.css file, because it's being parsed as a page with such a title by CakePHP. So what's the recipe for this cake?

Edit: Wrong location. The CSS folder should be in app/webroot, not in the web root of the host.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜