h
http://www.buyuk-tire.com/news-index.htmhttp://www.buyuk-tire.com/konu-1-Tirehaber/http://www.buyuk-tire.com/news-archive.year-2008-month-5.htmhttp://www.buyuk-tire.com/haber-48-tire’li-hanimlar-hasir-ormeyi-seviyor/$story->title = str_replace(" ","-",$story->title);
mainfile.php
$GLOBALS['_rewriteRulesFrom'] = array(
'/forum/',
'/haber-',
'/konu-',
'/arsiv-',
);
$GLOBALS['_rewriteRulesTo'] = array(
'/modules/newbbex/',
'/modules/news/article.php?storyid=',
'/modules/news/index.php?storytopic=',
'/modules/news/print.php?storyid=',
);
$GLOBALS['_abs_offset'] = preg_replace('/https?://'.$_SERVER["HTTP_HOST"].'/','',XOOPS_URL);
$GLOBALS['_rewriteRulesTo1'] = preg_replace('/^(.*)$/e','"!('.XOOPS_URL.'|"".$GLOBALS["_abs_offset"]."|'".$GLOBALS["_abs_offset"].")".preg_quote("1","!")."!"', $GLOBALS['_rewriteRulesTo']);
$GLOBALS['_rewriteRulesFrom1'] = preg_replace('/^(.*)$/','\11',$GLOBALS['_rewriteRulesFrom']);
function modul_turkcelestirici( $s ) {
$s = preg_replace($GLOBALS['_rewriteRulesTo1'],$GLOBALS['_rewriteRulesFrom1'], $s);
while($i<=count($GLOBALS['_rewriteRulesFrom'])) {
$s = preg_replace( '/('.preg_quote(XOOPS_URL,'/').'|"|')'.preg_quote($GLOBALS['_rewriteRulesTo'][$i],'/').'/' ,"\1".$GLOBALS['_rewriteRulesFrom'][$i] , $s ) ;
$i++;
}
return $s;
}
if (empty($_SERVER['REDIRECT_URL']) || ($_SERVER['REDIRECT_URL'] == $_SERVER['REQUEST_URI'])) {
if (empty($_SERVER['REDIRECT_REDIRECT_STATUS'])) {
if (($_changer_url=modul_turkcelestirici('"'.$_SERVER['REQUEST_URI'].'"')) != '"'.$_SERVER['REQUEST_URI'].'"') {
header('Location: ' . str_replace('"','',$_changer_url));
}
}
}
$_SERVER['REQUEST_URI'] = str_replace( $GLOBALS['_rewriteRulesFrom'],$GLOBALS['_rewriteRulesTo'], @$_SERVER['REQUEST_URI'] ) ;
$_SERVER['HTTP_REFERER'] = str_replace($GLOBALS['_rewriteRulesFrom'], $GLOBALS['_rewriteRulesTo'], @$_SERVER['HTTP_REFERER'] ) ;
ob_start( 'modul_turkcelestirici' ) ;
.htaccess
RewriteEngine on
RewriteRule ^konu-(.*)$ modules/news/index.php?storytopic=$1 [L]
RewriteRule ^haber-(.*)$ modules/news/article.php?storyid=$1 [L]
RewriteRule ^arsiv-(.*)$ modules/news/print.php?storyid=$1 [L]
örnek - example : 1
$this->keywords = str_replace(" ","-",$this->keywords);
$story['title'] = "
".$this->title()."";
.............
örnek - example : 2
$this->title = str_replace(" ","-",$this->title);
$story['title'] = "
".$this->title()."";
example str_replace 1
$story->title = str_replace('ç','c',$story->title);
$story->title = str_replace('Ç','c',$story->title);
example str_replace 2
$this->keywords = str_replace ("ç","c",$this->keywords);
$this->keywords = str_replace ("?","g",$this->keywords);
$this->keywords = str_replace ("?","i",$this->keywords);
..............
result
news seo