启动时问候PHP问题

时间:2012-06-30 03:56:48

标签: cakephp cakephp-1.3

我在webroot文件夹中有css和js,但都没有加载...

在firebug中出现错误

"NetworkError: 500 Internal Server Error - http://localhost/cakephp/"
"NetworkError: 404 Not Found - http://localhost/cakephp/css/common.css"
"NetworkError: 404 Not Found - http://localhost/cakephp/js/common.js"

我的基本文件夹是 cakephp 。但是一些内容显示在页面(http:// localhost / cakephp /)中,没有样式。内容来自数据库。

主要重定向链接也无效...

  

在此服务器上找不到请求的URL / cakephp / videos / list。

只有主页显示内容......

布局页面

echo $this->Html->css('common');
echo $this->Html->css('dialog');
echo $this->Html->script('jquery.min'); 
echo $this->Html->script('common'); 

的.htaccess

# compress text, html, javascript, css, xml:
SetOutputFilter DEFLATE
<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

应用程序/ htaccess的

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule    ^$    webroot/    [L]
    RewriteRule    (.*) webroot/$1    [L]
 </IfModule>

应用程序/根目录/ htaccess的

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

1 个答案:

答案 0 :(得分:0)

你应该在Apache配置中启用mod_rewrite,你可以在这里找到更多信息,http://book.cakephp.org/2.0/en/development/routing.html

如果您需要app/config/core.php第84行

,也可以关闭mod_rewrite。
相关问题