【发布时间】:2013-01-28 15:33:39
【问题描述】:
我已经在windows服务器上上传了cakephp文件,
我收到一个错误 HTTP 错误 404.0 - 未找到以下所有页面。
http://exoticvoyages.ntechinfo.com/index/index
http://exoticvoyages.ntechinfo.com/index/search
http://exoticvoyages.ntechinfo.com/index/getcountry
http://exoticvoyages.ntechinfo.com/countries/index
但是,如果我将以上所有页面重定向到http://exoticvoyages.ntechinfo.com/,那么它工作正常。
主要的.htaccess文件是
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
App .htaccess 文件是
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /app/
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
Webroot .htaccess 文件是
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /app/webroot/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
谁能给我解决办法?
【问题讨论】:
-
route.php 中的默认路由是什么
-
Router::connect('/', array('controller' => 'countries', 'action' => 'index')); Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display')); CakePlugin::routes();需要蛋糕。 '配置' 。 DS 。 'routes.php';
-
exoticvoyages.ntechinfo.com/countries/index 必须工作,但你提到它在你的问题的顶部不起作用,其他都是错误的,它们必须像索引而不仅仅是索引。
-
如果有帮助,请查看我的答案..
-
不,我创建 IndexController 时没有使用 $uses = array(); 之类的模型;
标签: php windows .htaccess cakephp windows-server-2003