简体   繁体   English

在开发服务器上设置时,cake php给我错误

[英]cake php gives me error when setting up on development server

First of all, I want to describe that I have researched a lot on this question so thats why I am asking so please dont downvote. 首先,我想描述一下我在这个问题上已经做了很多研究,所以这就是为什么我要问,所以请不要投票。 I have implemented lot of solutions. 我已经实施了很多解决方案。

I am using cake2.0. 我正在使用cake2.0。 I have uploaded a website on development server the link is http://dev.infideaco.com/eventmanager/ . 我已经在开发服务器上上传了一个网站,链接为http://dev.infideaco.com/eventmanager/ But I am getting the not found error. 但是我遇到了未找到的错误。 I have resolved it by changing the .htaccess files but then the css,js and images are still not available. 我已经通过更改.htaccess文件解决了该问题,但是css,js和图像仍然不可用。

I have .htaccess files which are provided by default installation. 我有默认安装提供的.htaccess文件。 I am setting it up in development server /var/www/dev.infideaco.com/eventmanager 我在开发服务器/var/www/dev.infideaco.com/eventmanager中进行设置

The website is running fine on other servers. 该网站在其他服务器上运行良好。 You can check here: http://swirlsyogurtbar.com/js/ These are the htaccess files: 您可以在此处检查: http : //swirlsyogurtbar.com/js/这些是htaccess文件:

root file:<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/    [L]
RewriteRule sss   (.*) app/webroot/$1 [L]
</IfModule>
in app:<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$  webroot/    [L]
RewriteRule (.*) webroot/$1    [L]
</IfModule>
app/webroot/.htaccess:<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

Please provide me the solution. 请提供解决方案。 Lot of thanks in advance 提前多谢

I would first check if server supports mod_rewrite. 我将首先检查服务器是否支持mod_rewrite。 Also check this thread if you haven't already: cakePHP - 404- page not found error, when deploying on a different machine 如果还没有,请检查此线程: cakePHP-404- page not found错误,在另一台机器上部署时

root file: 根文件:

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

in app: 在应用程式中:

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

app/webroot/.htaccess: app / webroot / .htaccess:

  <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]
  </IfModule>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM