Welcome Guest, Not a member yet? Register   Sign In
[NEED URGENT HELP] All controllers showing 404 except default controller
#18

(This post was last modified: 09-14-2018, 03:19 AM by ciadmin.)

(05-16-2015, 02:16 AM)webdevron Wrote: try using index.php before adding your controller's name
build url in this format : domain name/index.php/controller'name/method in controller/parameters 
example : http://example.com/index.php/student/ 
PHP Code:
$route['default_controller'] = "home";

$route['(:any)'] = 'home/$1'   // http://example.com/any
$route['load/(:any)'] = 'home/load/$1' // http://example.com/load/any

$route['student'] = 'student' // http://example.com/student
$route['student/(:num)'] = 'student/profile/$1' // http://example.com/student/1234

$route['admin'] = 'admin' // http://example.com/admin
$route['admin/(:any)'] = 'admin/$1' // http://example.com/admin/any 
My .htaccess code is here

Code:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^system.*
RewriteCond $1 !^(index\.php|images|js|uploads|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Reply


Messages In This Thread
RE: [NEED URGENT HELP] All controllers showing 404 except default controller - by sukant02 - 09-14-2018, 12:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB