cakephp:在共享主机上配置cakephp [英] cakephp: configuring cakephp on shared host justhost
问题描述
我尝试在justhost上为我的addon域配置cakephp,当我访问www.merryflowers.com/pages/home时,我收到404未找到错误
以下是我在/webroot/index.php和/webroot/test.php中所做的更改
if(!defined('ROOT')){
define('ROOT',DS.'home'.DS.'xxx' .DS.'public_html');
}
if(!define('APP_DIR')){
define('APP_DIR','merryflowers');
}
if(!defined('CAKE_CORE_INCLUDE_PATH')){
define('CAKE_CORE_INCLUDE_PATH',DS.'home'.DS.'xxx');
}
我需要对.htaccess文件进行一些更改吗?以及.htaccess文件从哪个文件夹?
在public_html / merryflowers.com /我有:
视图,插件和webroot文件夹
谢谢
看起来 mod_rewrite
无法正常工作,我可以访问 webroot
目录(http://www.merryflowers.com/webroot/),其中指出找不到core.php
。在查看可能的 mod_rewrite
问题之前,请确保 core.php
已正确包含。</ p>
我不确定你需要设置 index.php
中的所有路径,设置 CAKE_CORE_INCLUDE_PATH
可能就足够了。
您的完整路径不是 DS.'home'.DS.'xxx'
,但是:
DS.'home'.DS.'xxx'。'public_html'.DS.'merryflowers.com'
您可能要设置 ROOT
和 APP_DIR
到默认值,除非您需要自定义路径。
I tried to configure cakephp on justhost for my addon domain and i'm getting 404 not found error when I go to www.merryflowers.com/pages/home
Can someone please help me out?
The following are the changes I made in /webroot/index.php and /webroot/test.php
if (!defined('ROOT')) {
define('ROOT', DS.'home'.DS.'xxx'.DS.'public_html');
}
if (!defined('APP_DIR')) {
define('APP_DIR', 'merryflowers');
}
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
define('CAKE_CORE_INCLUDE_PATH', DS.'home'.DS.'xxx');
}
Do I need to make some changes to the .htaccess file? and .htaccess file from which folder?
under public_html/merryflowers.com/ i have: views, plugins and webroot folder
thank you
It seems mod_rewrite
isn't functioning properly, I can access the webroot
directory (http://www.merryflowers.com/webroot/), which states that core.php
can't be found. Before you look into possible mod_rewrite
problems, ensure core.php
is properly included.
I'm not sure you need to set all the paths in index.php
, setting CAKE_CORE_INCLUDE_PATH
might be enough.
You're full path isn't DS.'home'.DS.'xxx'
, but:
DS.'home'.DS.'xxx'.'public_html'.DS.'merryflowers.com'
You might want to set ROOT
and APP_DIR
to the default values, unless you need custom paths.
这篇关于cakephp:在共享主机上配置cakephp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!