Just started developing in CakePHP, installed it and configured it. However the application doesn't output the correct path to the stylesheet.
When viewing the source of the page the path to the stylesheet is:
/rm-lab/css/cake.generic.css
This leads to 404 error page.
The stylesheet loads if I try to access it through this path;
/rm-lab/app/css/cake.generic.css
Appreciate the help.
UPDATE: After trying numerous solutions, I just did a fresh install of cakePHP in another subfolder and this loads the CSS fine. I think it was to do with the .htaccess files.
It appears that your cake app is in a subfolder. You should set the rewrite base in your .htaccess file in app/webroot
In app/webroot/.htaccess, add the following line:
RewriteBase /rm-lab
Your .htaccess file should now appear as such:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /rm-lab
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With