You can use sef_ext plugins.
In sh404sef find sef_ext folder and create com_my_comp.php file
<?php
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
// ------------------ standard plugin initialize function - don't change ---------------------------
$sefConfig = &Sh404sefFactory::getConfig();
$shLangName = '';
$shLangIso = '';
$title = array();
$shItemidString = '';
$dosef = shInitializePlugin($lang, $shLangName, $shLangIso, $option);
if ($dosef == false)
{
return;
}
// ------------------ standard plugin initialize function - don't change ---------------------------
$title[] = 'my-comp-page';
shRemoveFromGETVarsList('view');
shRemoveFromGETVarsList('id');
shRemoveFromGETVarsList('option');
shRemoveFromGETVarsList('lang');
shRemoveFromGETVarsList('task');
// ------------------ standard plugin finalize function - don't change ---------------------------
if ($dosef)
{
$string = shFinalizePlugin($string, $title, $shAppendString, $shItemidString, (isset($limit) ? $limit : null),
(isset($limitstart) ? $limitstart : null), (isset($shLangName) ? $shLangName : null), (isset($showall) ? $showall : null),
$suppressPagination = true);
}
// ------------------ standard plugin finalize function - don't change ---------------------------
?>
With shRemoveFromGETVarsList you can remove any parameter added to url.
It's not a good idea use comma character in url, to get something like your first url:
$jinput = JFactory::getApplication()->input;
$Itemid = $jinput->getInt('Itemid');
$title[] = 'option_'.$option;
$title[] = 'Itemid_'.$Itemid;
$title[] = 'task_'.$task;
If you want to use comma, you can enable it, in sh404sef configuration panel, in "Strip characters" option.