I am not familiar with url rewrite at all, so I have probably simple question for somebody that knows the stuff. I have ecommerce site and currently item url looks like this www.blizuecomm.net/www/item.php?id=399&ITEM-NAME I get this kind of URL with code on category page that looks like this
<a href="item.php?id=<?=$values[$i]['gitemid']?>&<?=cleanString($values[$i]['gname'])?>
I get clean string using this code
<?
function cleanString($string, $separator = '-'){
$accents = array('Š' => 'S', 'š' => 's', '?' => 'Dj', 'ð' => 'dj','Ž' => 'Z', 'ž' => 'z', 'È' => 'C' , 'è' => 'c', 'Æ' => 'C' , 'æ' => 'c');
$string = strtr($string, $accents);
$string = strtoupper($string);
$string = preg_replace('/[^a-zA-Z0-9\s]/', '', $string);
$string = preg_replace('{ +}', ' ', $string);
$string = trim($string);
$string = str_replace(' ', $separator, $string);
return $string;
}
?>
What should I write in .htaccess file in order to get ULR that looks like this: www.blizuecomm.net/www/ITEM-NAME or www.blizuecomm.net/ITEM-NAME