I found that the URI segment was combining the suffix (.HTML) with the last argument
e.g
it is considered as
I modified the URI.php library file to remove the suffix and then it started working.
Now everything did work fine.
The actual modification I made was to
function _explode_segments()
{
foreach(explode(”/”, preg_replace(”|/*(.+?)/*$|”, “\\1”, $this->uri_string)) as $val)
{
// Filter segments for security
$val = trim($this->_filter_uri($val));
if ($val != ‘’)
{
$this->segments[] = $val;
}
}
}
to this
function _explode_segments()
{
foreach(explode(”/”, preg_replace(”|/*(.+?)/*$|”, “\\1”, $this->uri_string)) as $val)
{
// Filter segments for security
$val = trim($this->_filter_uri($val));
if ($val != ‘’)
{
$this->segments[] = $val;
}
}
/* START: Non CI code to solve the problem of suffix combining with the last argument */
if ($this->config->item(‘url_suffix’) != ‘’) {
$index = sizeof($this->segments);
$index -= 1;
$url_suffix = str_replace(”.”,“_”,$this->config->item(‘url_suffix’));
if (substr($this->segments[$index],(strlen($this->segments[$index]) - strlen($url_suffix)),strlen($url_suffix)) == $url_suffix) {
$this->segments[$index] = substr($this->segments[$index],0,(strlen($this->segments[$index]) - strlen($url_suffix)));
}
}
/* END: Non CI code to solve the problem of suffix combining with the last argument */
}
Please let me know if this is the right solution or is there a proper solution to it. Thank you very much for your help!
Chaleswa
continue reading ...