Vikas Sharma
Vikas Sharma

Reputation: 56

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

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

Upvotes: 0

Views: 276

Answers (1)

Anh Pham
Anh Pham

Reputation: 5481

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.

Upvotes: 1

Related Questions