Php 页面路由编码点火器

Php 页面路由编码点火器,php,codeigniter,Php,Codeigniter,我正在使用一本名为PHP和MVC与CodeIgniter的参考书,我正在跟踪将项目放入个人电脑的示例。它在我的本地电脑上运行良好,但在Web服务器上出现了一些错误。 诊断:问题在于页面的路径。在我的个人电脑中工作正常,但当我把它放到web服务器上时却找不到请求的页面 http://orion.locadados.com.br/~wladi/Carrinho_Compras/ http://orion.locadados.com.br/~wladi/Carrinho_Compras/categor

我正在使用一本名为PHP和MVC与CodeIgniter的参考书,我正在跟踪将项目放入个人电脑的示例。它在我的本地电脑上运行良好,但在Web服务器上出现了一些错误。 诊断:问题在于页面的路径。在我的个人电脑中工作正常,但当我把它放到web服务器上时却找不到请求的页面

http://orion.locadados.com.br/~wladi/Carrinho_Compras/
http://orion.locadados.com.br/~wladi/Carrinho_Compras/categoria/artigos-esportivos 
“我的项目”中定义的路由是任何服务器的默认路由,因为它们位于项目文件夹本身中。只是不要把这行代码放在网上,它就不知道把哪部分代码放在网上了

我怎样才能解决这个问题

文件.htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
文件routes.php

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
|   example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|   http://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There area two reserved routes:
|
|   $route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|   $route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router what URI segments to use if those provided
| in the URL cannot be matched to a valid route.
|
*/


$route['default_controller'] = "home";
$route['categoria/(:any)'] = "home/categoria/$1";
$route['produto/(:any)'] = "produtos/detalhes_produto/$1";

$route['404_override'] = '';

/* End of file routes.php */
/* Location: ./application/config/routes.php */

同时发布您的.htaccess,然后您的服务器上是否启用了apache mod_rewrite?我只是把请求的内容放进去了。请立即在上面核对。