Merhaba Arkadaşlar .htaccess ile permalink yapıyorumda ğşöç leri bir türlü gsoc ye ceviremedim bildiginiz çalışan bir function varmı ? benim kullandıgım şu şekil

function seoyap($text) { 
    $text=str_replace(" ","-",trim($text)); 
    $text=preg_replace("@[^A-Za-z0-9\-_ĞÜŞİÖÇğüşıöç]+@i","",$text); 
    $text=ereg_replace(" +"," ",trim($text)); 
    $text=ereg_replace("[-]+","-",$text); 
    $text=ereg_replace("[_]+","_",$text); 
    $text=strtolowerTR($text); 
    if ((substr($text,-1)=='_')||(substr($text,-1)=='-')) $text=substr($text,0,-1); 
    return $text; 
} 

function strtolowerTR($text) { 
    $TRBul=array('Ğ','Ü','Ş','İ','Ö','Ç','ğ','ü','ş','ı','ö','ç'); 
    $TRDegistir=array('g','u','s','i','o','c','g','u','s','i','o','c'); 
    $text=str_replace($TRBul,$TRDegistir,$text); 
    $text=strtolower($text); 
    return $text; 
}