Posted by ecallica on 24-02-2009 14:10
#1
halo.. ada info tips & trik 1 lagi dari tetangga sebelah masalah SEO php fusion
hal ini berguna banget untuk web kita agar di indeks oleh mesin pencari
maksud gw biasanya klo kita perhatiin di web yang dibangun menggunakan php fusion klo kursor mouse diarahin ke artikel maka link akan berubah menjadi
http://www.namawebsitekita.com/articles.php
nah inilah pentingnya SEO merubah extensi web kita menjadi seperti ini
http://www.namawebsitekita.com/articles.html
agar lebih mudah mesin pencari meng-indeks web kita
catatan : Hal ini ga berlaku untuk hosting gratisan, karena akan menyebabkan error
keknya udah terlalu panjang lebar nh berikut cara yang gw dapat.....
1. buka dan cari file /maincore.php
cari file
dibawahnya tambahin file ini
Code
function rewrite_urls($buf) {
if(!substr_count($_SERVER['REQUEST_URI'],"administration")) {
$buf = preg_replace('#readarticle\.php\?article_id=([0-9]*?)(\'|")#si', 'read-article\1.html\2', $buf);
$buf = preg_replace('#articles\.php\?cat_id=([0-9]*?)(\'|")#si', 'articles_cat\1.html\2', $buf);
$buf = preg_replace('#articles\.php#si', 'articles.html', $buf);
$buf = preg_replace('#downloads\.php\?cat_id=([0-9]*?)(\'|")#si', 'downloads_cat\1.html\2', $buf);
$buf = preg_replace('#downloads\.php\?cat_id=([0-9]*?)(&|&)download_id=([0-9]*?)(\'|")#si', 'downloads\1-file-\3.html\4', $buf);
$buf = preg_replace('#downloads\.php#si', 'downloads.html', $buf);
$buf = preg_replace('#faq\.php\?cat_id=([0-9]*?)(\'|")#si', 'faq_cat\1.html\2', $buf);
$buf = preg_replace('#faq\.php#si', 'faq.html', $buf);
$buf = preg_replace('#weblinks\.php\?cat_id=([0-9]*?)(\'|")#si', 'links_cat\1.html\2', $buf);
$buf = preg_replace('#weblinks\.php\?cat_id=([0-9]*?)(&|&)weblink_id=([0-9]*?)(\'|")#si', 'links_cat\1-linkid-\3.html\4', $buf);
$buf = preg_replace('#weblinks\.php#si', 'links.html', $buf);
$buf = preg_replace('#news_cats\.php#si', 'news-categories.html', $buf);
$buf = preg_replace('#news\.php\?readmore=([0-9]*?)(\'|")#si', 'readnews-\1.html\2', $buf);
$buf = preg_replace('#contact\.php#si', 'contacts.html', $buf);
$buf = preg_replace('#photogallery\.php\?album_id=([0-9]*?)(\'|")#si', 'gallery-album\1.html\2', $buf);
$buf = preg_replace('#photogallery\.php\?photo_id=([0-9]*?)(\'|")#si', 'gallery-photo\1.html\2', $buf);
$buf = preg_replace('#showphoto\.php\?photo_id=([0-9]*?)(\'|")#si', 'showphoto\1.html\2', $buf);
$buf = preg_replace('#photogallery\.php#si', 'gallery.html', $buf);
$buf = preg_replace('#search\.php\?stype=f#si', 'search-f.html', $buf);
$buf = preg_replace('#search\.php#si', 'search.html', $buf);
$buf = preg_replace('#profile\.php\?lookup=([0-9]*?)(\'|")#si', 'profile-\1.html\2', $buf);
$buf = preg_replace('#print\.php\?type=N(&|&)item_id=([0-9]*?)(\'|")#si', 'print_news\2.html\3', $buf);
$buf = preg_replace('#print\.php\?type=A(&|&)item_id=([0-9]*?)(\'|")#si', 'rint_article\2.html\3', $buf);
$buf = preg_replace('#register\.php#si', 'register.html', $buf);
$buf = preg_replace('#lostpassword\.php#si', 'lostpassword.html', $buf);
$buf = preg_replace('#viewpage\.php\?page_id=([0-9]*?)(\'|")#si', 'viewpage\1.html\2', $buf);
}
return $buf;
}
abis itu tambahin file .htaccess dan taro di root folder php fusion dan isi dari .htaccess dengan file berikut
Code
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/(.*)$
RewriteRule ^articles\.html$ articles.html [N]
RewriteRule ^articles_cat([0-9]+)\.html$ articles.html?cat_id=$1 [L]
RewriteRule ^read-article([0-9]+)\.html$ readarticle.php?article_id=$1 [L]
RewriteRule ^index\.html$ index.php [N]
RewriteRule ^downloads\.html$ downloads.html [N]
RewriteRule ^faq\.html$ faq.html [N]
RewriteRule ^links\.html$ links.html [N]
RewriteRule ^news-categories\.html$ news-categories.html [N]
RewriteRule ^news\.html$ news.php [N]
RewriteRule ^readnews-([0-9]+)\.html$ news.php?readmore=$1 [L]
RewriteRule ^contacts\.html$ contacts.html [N]
RewriteRule ^gallery\.html$ gallery.html [N]
RewriteRule ^search-f\.html$ search-f.html [N]
RewriteRule ^search\.html$ search.html [N]
RewriteRule ^profile-([0-9]+)\.html$ profile.php?lookup=$1 [L]
RewriteRule ^gallery-album([0-9]+)\.html$ gallery.html?album_id=$1 [L]
RewriteRule ^gallery-photo([0-9]+)\.html$ gallery.html?photo_id=$1 [L]
RewriteRule ^showphoto([0-9]+)\.html$ showphoto.php?photo_id=$1 [L]
RewriteRule ^downloads_cat([0-9]+)\.html$ downloads.html?cat_id=$1 [L]
RewriteRule ^downloads_cat([0-9]+)-file([0-9]+)\.html$ downloads.html?cat_id=$1&download_id=$2 [L]
RewriteRule ^faq_cat([0-9]+)\.html$ faq.html?cat_id=$1 [L]
RewriteRule ^links_cat([0-9]+)\.html$ links.html?cat_id=$1 [L]
RewriteRule ^links_cat([0-9]+)-linkid-([0-9]+)\.html$ links.html?cat_id=$1&weblink_id=$2 [L]
RewriteRule ^print_news([0-9]+)\.html$ print.php?type=N&item_id=$1 [L]
RewriteRule ^print_article([0-9]+)\.html$ print.php?type=A&item_id=$1 [L]
RewriteRule ^register\.html$ register.html [N]
RewriteRule ^lostpassword\.html$ lostpassword.html [N]
RewriteRule ^viewpage([0-9]+)\.html$ viewpage.php?page_id=$1 [L]
udah itu cari file footer.php di /themes/templates/footer.php
cari file ini
Code
echo handle_output($output);
tiban/ganti sama code ini
Code
echo rewrite_urls(handle_output($output));
coba deh liat web lo sekarang setiap extensinya berubah jadi .html
semoga membantu
:?jij?