cake php无法正确读取url

时间:2014-04-17 10:36:49

标签: php cakephp url-rewriting debian

我刚买了一台新的专用服务器来建立我的网站

我的网站是用cake php和服务器debian创建的

当我查看我的网站www.exemple时。它让我出html css和流程,但图像不显示 无法加载资源:服务器响应状态为404(未找到)http://exemple.com/img/logo.png

该文件存在于/ webroot / img /

该网站为http://proveille.com

2 个答案:

答案 0 :(得分:1)

 1. Make sure that an .htaccess override is allowed and that
    AllowOverride is set to All for the correct DocumentRoot.
 2. Make sure you are loading mod_rewrite correctly.
 3. Make sure your copy of CakePHP comes from the downloads section of
    the site or our Git repository, and has been unpacked correctly, by
    checking for .htaccess files.

有关详细信息,请阅读食谱page

答案 1 :(得分:0)

在/ app中为此

编辑.htaccess文件
<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>
相关问题