Cake php not including css/js files | Techbirds
Posted on: February 28, 2014 /
Categories: PHP / Author Name: Shivek Parmar
Read the cake php documentation carefully and follow each and every steps at https://book.cakephp.org/1.3/en/The-Manual/Developing-with-CakePHP/Installation.html
If somehow cake is not including css/js files from webroot folder then check for the following solutions. But make sure to change the all the three .htaccess files according to the instructions in https://book.cakephp.org/1.3/en/The-Manual/Developing-with-CakePHP/Installation.html
- Un-comment the following line from Apache httpd.conf file
-
#LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule rewrite_module modules/mod_rewrite.so
to
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule rewrite_module modules/mod_rewrite.so
- even if that doesn’t work than try un-commenting
Configure::write(‘App.baseUrl’,env(‘SCRIPT_NAME’));
Configure::write(‘App.baseUrl’,env(‘SCRIPT_NAME’));
from /example/app/config/core.php and if that doesn’t work then do un-comment
//Configure::write(‘App.fullBaseUrl’, ‘https://example.com’);
//Configure::write(‘App.fullBaseUrl’, ‘https://example.com’);
//Configure::write(‘App.imageBaseUrl’, ‘img/’);
//Configure::write(‘App.imageBaseUrl’, ‘img/’);
//Configure::write(‘App.cssBaseUrl’, ‘css/’);
//Configure::write(‘App.cssBaseUrl’, ‘css/’);
//Configure::write(‘App.jsBaseUrl’, ‘js/’);
//Configure::write(‘App.jsBaseUrl’, ‘js/’);
891 total views, 1 views today
Share this On