我的问题是关于 codeigniter 的路线,我正在使用它,并且我为每个函数编写了路线。当我放最后一条路线时,这条路线不起作用,它给了我 404 错误。我不知道为什么?也许我在路线顺序上做错了,但我认为是对的。这是我的路线:
//MATCH SHARE
// route not working
$routes['upload_image/upload_photo'] = "upload_image/upload_photo";
//all route working
//VOTATION//
$route['auth_social/fblogin'] = "auth_social/fblogin";
$route['votation/user_plus/(:any)'] = "votation/user_plus";
$route['votation/user_minum/(:any)'] = "votation/user_minum";
$route['finish_registration/(:any)/(:any)'] = "auth/activate"; // activate e-mail
$route['auth'] = "auth"; // index auth
$route['register'] = "auth/register";
$route['login'] = "auth/login"; // login
$route['logout'] = "auth/logout";
$route['default_controller'] = "auth/register"; // register
$route['(:any)'] = "profile/user";
$route['404_override'] = '';
htaccess
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]