Cakephp css and images problem on localhost

I downloaded the project from the root server. He acts there very well. But when I run the project on a local host in the xampp environment, I did not find any css or any images. How can I solve this problem?

+3
source share
3 answers

You should also check the contents of your .htaccess files in the installation root directory in /appand /app/webroot. Depending on whether you use CakePHP from a subdirectory (e.g. http://domain.com/somesubdirectory/ ), you may need to add a directive RewriteBaseto your .htaccess file in /app/webroot/. More details here .

+1
source

/app/webroot/css /app/webroot/img. mod_rewrite.

+1

, mod_rewrite:

“Sometimes a new user gets into mod_rewrite problems, so I’m not mentioning them much here. If CakePHP's welcome page looks a little funny (without images or CSS styles), this probably means mod_rewrite isn’t working on your system. Here are some tips that help you start and run: ... "

0
source

Source: https://habr.com/ru/post/1756694/


All Articles