php - $route['admin/clients/update/(:any)'] on routes giving me 404 page not found Error? -
i have started working codeigniter, working in admin command panel of little project. getting 404 page not found error when trying edit or delete.
in routes.php $route['admin/clients/update/(:any)'] = 'admin_clients/update/$1';
giving me 404 error.
if access $route['admin/clients/update'] = 'admin_clients/update';
, loading edit form.if pass segement 4 in url giving me 404 page not found error.
here htaccess
rewriteengine on rewritebase /testing_palace/ rewritecond $1 !^(index\.php|resources|robots\.txt) rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php/$1 [l,qsa]
am not getting exact problem is.please help me, response appreciated
you need check order of route definitions.
for illustration
$route['admin/(:any)'] = 'admin/$1'; $route['admin/clients/(:any)'] = 'admin/clients/$1'; $route['admin/clients/update/(:any)'] = 'admin_clients/update/$1';
will grab first rule, , admin/clients/update/1
admin/clients/update/1
, because of this, may give 404 error.
but this:
$route['admin/clients/update/(:any)'] = 'admin_clients/update/$1'; $route['admin/clients/(:any)'] = 'admin/clients/$1'; $route['admin/(:any)'] = 'admin/$1';
every rule checked until valid rule, admin/clients/update/1
redirect admin_clients/update/1
.
php .htaccess codeigniter
No comments:
Post a Comment