0

Why all css files and images are not getting loaded in cakephp. Although i've written code like this in my default.ctp

echo $html->css('generic');

Please help me in this issue..

css files are placed in app\webroot\css

2
  • In the CSS file, what is the URL that is pointing at the images? if everything works, but the images don't load, it is probably an issue with the way you are pointing at the images in the CSS file. Give us an example of how your pointing at an image in the css file. Commented Jul 2, 2011 at 10:58
  • I got a solution, these changes in my apache htaccess file <Directory /> Options FollowSymLinks AllowOverride All # Order deny,allow # Deny from all </Directory> and remove comment before LoadModule rewrite_module modules/mod_rewrite.so Commented Jul 2, 2011 at 11:08

2 Answers 2

4

You have to copy the .htaccess file into your htdocs/yourcakeproject/ directory. If you're running your Cake application on an Apache webserver you have to make sure that the module mod_rewrite is installed.

If you use Lighttpd as your webserver, there is a chapter in the CakeBook how you have to configure Lighttpd: Pretty-URLs-and-Lighttpd.

Sign up to request clarification or add additional context in comments.

Comments

1

Try this changes.In Apache config File

1.LoadModule rewrite_module modules/mod_rewrite.so (Enable This Line) by removing #.Next Step is

2.Replace This Code “AllowOverride None” By “AllowOverride All”.

1 Comment

Replacing “AllowOverride None” By “AllowOverride All” solved this problem for me,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.