After looking in a lot places, finally posting it here.
I have rename a method in codeigniter's controller from classDetails to class-details.
I am using the following code in .htaccess but it did not work
RewriteRule ^classDetails/(.*)$ class-details/$1 [R=301,L]
I have also tried this code in /application/config/routes.php
$route['classDetails'] = 'class-details';
I have also tried
$routes['classDetails'] = 'class-details';
I have even tried using _remap() in codeigniter as follows
public function _remap($method, $params = array()){
switch ($method){
case 'classDetails':$method='class_details'; break;
};
if (method_exists($this, $method))
{
return call_user_func_array(array($this, $method), $params);
}
show_404();
}
No matter what I do it goes to 404 page
Where am I doing it wrong?
[EDIT]
my method name is class_details and I am overwriting that in the url using a custom core class called MY_Router.php