Saturday, 31 August 2013

Cakephp only loads one .css-file - 403-Error for all others

Cakephp only loads one .css-file - 403-Error for all others

I have a problem which I find fairly strange, maybe someone can help me.
I use cakephp. My web root folder for apache is /home/jw/www. My project
is under /home/jw/www/hc2, so the overall folder structure (only the parts
important for this question) is:
www
/hc2
/app
/webroot
index.php
/css
/cake.generic.css
/any.css
/other.css
/stylesheets.css
/js
/any.js
/javascript.js
/files.js
Well, cakephp works fine so far - routing (with mod_rewrite enabled),
database connection etc. works. The one but huge problem is: No .css- or
.js-files are loaded, except the cake.generic.css! The part of the
.cpt-template, where I load css and js files looks something like:
echo $this->Html->css('cake.generic');
echo $this->Html->css('bootstrap.min');
echo $this->Html->css('layout');
echo $this->Html->script('bootstrap.min');
echo $this->Html->script('jquery-2.0.3.min');
In the html- of the loaded page this becomes e.g.:
<link href="/hc2/css/cake.generic.css" type="text/css" rel="stylesheet">
<link href="/hc2/css/bootstrap.min.css" type="text/css" rel="stylesheet">
But when I examine those two with firebug, I see that the first of those
is loaded correctly - I can see the css-definitions of the file - while
the other one receives an error 403!
Is it maybe a mod_rewrite-problem? But since I can access all controllers
just the way it should be, I can't quite imagine that... Does anyone maybe
have an idea? Would be very happy, thanks...

No comments:

Post a Comment