2012-04-27 53 views
1

我有我的网站www.mysite.com在/ var/WWW/ ,我将我的CakePHP的应用程序在/ var/WWW /开发商制作上的一个子目录CakePHP的2.0工作

当我去www.mysite .com/developer我的登录页面正常,登录后我的应用程序带我到主页确定。但每当我在其他的链接点击我得到 “找不到网页”

我有3个htaccess的

/var/www/developer 
/var/www/developer/app 
/var/www/developer/app/webroot 

我应该把那些使我的网址工作?

感谢

回答

0

你的.htaccess文件也许应该是这样的:

在/ var/WWW /开发商

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

在/ var/WWW /开发/应用

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

/var/www/developer/app/webroot

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

你也应该有/var/www/developer/app/webroot/index.php

代替

if (!defined('ROOT')) { 
     define('ROOT', dirname(dirname(dirname(__FILE__)))); 
    } 

定义正确的路径尝试一些指定正确的方式(EQ。 DS。 'www'。 'develop') 通常只需重新定义CAKE_CORE_INCLUDE_PATH就足够了,但有时您需要定义所有三个ROOT WEBROOT_DIR nad CAKE_CORE_INCLUDE_PATH