My css
fil开发者_如何学Pythone is not loading.
I have just installed apache2 with php
on ubuntu
. (Mysql server already installed.)
I have placed fresh download of cake php
from official site. But when I am trying to access it, CSS
file is not loaded.
Here is the screen shot.
I would think telling him to read the instructions and setup requirements including the use of mod_rewrite would be a better solution than pointing him towards the no mod_rewrite method.
A quick google for mod_rewrite apache ubuntu brings up a ton of possibly useful information and will likely work out for him better than turning off one of Cake's key features.
Try deleting these files:
/.htaccess
/app/.htaccess
/app/webroot/.htaccess
and uncommenting this line on app/config/core.php [69]
Configure::write('App.baseUrl', env('SCRIPT_NAME'));
EDIT:
to answer your comment: as far as I know, what this does is set the base url of the app to index.php (env() Gets an environment variable from available sources) That baseUrl is used to rewrite the urls without using mod_rewitte, with pathinfo.
I've seen this issue when the .htaccess is missing from the root or from webroot. Usually, this occurs when adding files to svn and the .htaccess is not included.
Just wanted to add
to enable mod_rewrite with apache on ubuntu
sudo a2enmod rewrite
精彩评论