I am using one controller. How can I remove or hide the controller name on my URL using routes? I already set my .htaccess to remove my index.php. I\'ve tried lots of code from
Simple approach when i use CI:
Example Controller:
load->view('path/to/check/view');
}
public function choke()
{
$this->load->view('path/to/choke/view');
}
}
Example routes:
//same name with C method
$route['check'] = 'haha/check';
$route['choke/(:any)'] = 'haha/choke';
//or custom route name
$route['squirrel'] = 'haha/check';
$route['woohoo/(:any)'] = 'haha/choke';
My htaccess:
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|images|js|css|uploads|favicon.png)
RewriteCond %(REQUEST_FILENAME) !-f
RewriteCond %(REQUEST_FILENAME) !-d
RewriteRule ^(.*)$ ./index.php/$1 [L]
Access the uri:
http://yoursite.com/check
http://yoursite.com/choke/whatever
//or
http://yoursite.com/squirrel
http://yoursite.com/woohoo/whatever
Addition: Here is complete routes from my old project using CI, maybe you can get something.
Notes :
http://example.com/business/
will fail or not exist.
Good luck.