[eluser]jaysonic[/eluser]
Another solution, which has been posted although it modifies all the segments, is as follows.
Create the MY_Router.php file in /application/core and in it place the following code:
Code:
<?php
public function _set_request($segments){
// Fix only the first 2 segments
for($i = 0; $i < 2; ++$i){
if(isset($segments[$i])){
$segments[$i] = str_replace('-', '_', $segments[$i]);
}
}
// Run the original _set_request method, passing it our updated segments.
parent::_set_request($segments);
}
?>
This just modifies the first 2 segments in your URL, but only if they are set. Hopefully that helps someone.