开发者

Why img folder is not treated as a controller in cakephp?

开发者 https://www.devze.com 2023-04-05 20:52 出处:网络
In cakephp images works fine in img folder. e.g. http://localhost/cakeproject/img/xyz.jpg This image would work fine, but by cake\'s conventions \'img\' should be treated as a controller?

In cakephp images works fine in img folder.

e.g. http://localhost/cakeproject/img/xyz.jpg

This image would work fine, but by cake's conventions 'img' should be treated as a controller?

is there开发者_如何学运维 a .Htaccess code that cake uses to work with img or css or js folders?

Thanks

Vikas


yep, it's in the htaccess file in webroot:

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

That's not just for img or js folder, but any folder you put in webroot.

0

精彩评论

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