Değişik Bir Seo Uygulaması Hakkında

phpBB için Arama Motoru Optimizasyonu

Değişik Bir Seo Uygulaması Hakkında

İleti BaRaN 13.06.2006, 16:04

Bu kodlarda bi gariplik varmı bakarmısınız.Ben kurdum .html çıkıyo linklerin üstüne geldiğimde yalnız tıkladığımda sayfa açılmıyor .htacces de bi hata yapıyor olabilirim ama bi kaç kez denedim yine olmadı yardımlarınızı bekliyorum.İşte kodlar
Kod: Tümünü seç
-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------

includes/page_header.php

-----------------------------------
----[ FIND ]-----------------------
-----------------------------------

//
// Parse and show the overall header.
//
$template->set_filenames(array(
'overall_header' => ( empty($gen_simple_header) ) ? 'overall_header.tpl' : 'simple_header.tpl')
);

-----------------------------------
----[ AFTER, ADD ]-----------------
-----------------------------------

#======================================================================= |
#==== Start: == Dynamic Rewrite ======================================== |
#==== v1.0.0 =========================================================== |
#====
ob_start();
function dynamic_rewrite(&$to_change)
{
global $phpbb_root_path, $phpEx, $board_config, $userdata;
$file_listing = $phpbb_root_path;
$files = @opendir($file_listing);
while ($file = @readdir($files))
{
if (@strstr($file, $phpEx))
{
if (@strstr($to_change, 'href="'. $file) || @strstr($to_change, 'href="./'. $file) || @strstr($to_change, 'href="/'. $file) || @strstr($to_change, "href='". $file) || @strstr($to_change, "href='./". $file) || @strstr($to_change, "href='/". $file))
{
#==== Drop session ids for guests properly, since other mods dont always do it.
if ($userdata['user_id'] == ANONYMOUS)
$sessions_out = "";
else
$sessions_out = "-sid-". $userdata['session_id'] ."";

$in = array(
"'(?<!/)href=\"". $file ."'",
"'(?<!/)". str_replace('.php', '.html', $file) ."\?'",
"'(?<!/)". str_replace('.php', '.html', $file) ."-([^ \?&=\#\"<]*?)=([^ \?&=\#\"<]*?)'",
"'(?<!/)". str_replace('.php', '.html', $file) ."-([^ \?&=\#\"<]*?)-([^ \?&=\#\"<]*?)\&amp;([^ \?&=\#\"<]*?)=([^ \?&=\#\"<]*?)'",
"'(?<!/)". str_replace('.php', '.html', $file) ."-([^ \?&=\#\"<]*?)-([^ \?&=\#\"<]*?)\&([^ \?&=\#\"<]*?)=([^ \?&=\#\"<]*?)'",
"'(?<!/)". str_replace('.php', '.html', $file) ."-([^ \?&=\#\"<]*?)-([^ \?&=\#\"<]*?)-([^ \?&=\#\"<]*?)-([^ \?&=\#\"<]*?)\&amp;([^ \?&=\#\"<]*?)=([^ \?&=\#\"<]*?)'",
"'(?<!/)". str_replace('.php', '.html', $file) ."-([^ \?&=\#\"<]*?)-([^ \?&=\#\"<]*?)-([^ \?&=\#\"<]*?)-([^ \?&=\#\"<]*?)\&([^ \?&=\#\"<]*?)=([^ \?&=\#\"<]*?)'",
"'amp;'",

"'(?<!/)href=\"index.html(.*)'", "'(?<!/)href=\"/index.html(.*)'", "'(?<!/)href=\"\./index.html(.*)'", "'(?<!/)href=\'index.html(.*)'", "'(?<!/)href=\'/index.html(.*)'", "'(?<!/)href=\'\./index.html(.*)'",
"'(?<!/)href=\"viewforum.html(.*)'", "'(?<!/)href=\"/viewforum.html(.*)'", "'(?<!/)href=\"\./viewforum.html(.*)'", "'(?<!/)href=\'viewforum.html(.*)'", "'(?<!/)href=\'/viewforum.html(.*)'", "'(?<!/)href=\'\./viewforum.html(.*)'",
"'(?<!/)href=\"viewtopic.html(.*)'", "'(?<!/)href=\"/viewtopic.html(.*)'", "'(?<!/)href=\"\./viewtopic.html(.*)'", "'(?<!/)href=\'viewtopic.html(.*)'", "'(?<!/)href=\'/viewtopic.html(.*)'", "'(?<!/)href=\'\./viewtopic.html(.*)'",
"'(?<!/)href=\"groupcp.html(.*)'", "'(?<!/)href=\"/groupcp.html(.*)'", "'(?<!/)href=\"\./groupcp.html(.*)'", "'(?<!/)href=\'groupcp.html(.*)'", "'(?<!/)href=\'/groupcp.html(.*)'", "'(?<!/)href=\'\./groupcp.html(.*)'",
"'(?<!/)href=\"privmsg.html(.*)'", "'(?<!/)href=\"/privmsg.html(.*)'", "'(?<!/)href=\"\./privmsg.html(.*)'", "'(?<!/)href=\'privmsg.html(.*)'", "'(?<!/)href=\'/privmsg.html(.*)'", "'(?<!/)href=\'\./privmsg.html(.*)'",
"'(?<!/)href=\"profile.html(.*)'", "'(?<!/)href=\"/profile.html(.*)'", "'(?<!/)href=\"\./profile.html(.*)'", "'(?<!/)href=\'profile.html(.*)'", "'(?<!/)href=\'/profile.html(.*)'", "'(?<!/)href=\'\./profile.html(.*)'",
"'(?<!/)href=\"login.html(.*)'", "'(?<!/)href=\"/login.html(.*)'", "'(?<!/)href=\"\./login.html(.*)'", "'(?<!/)href=\'login.html(.*)'", "'(?<!/)href=\'/login.html(.*)'", "'(?<!/)href=\'\./login.html(.*)'",
"'(?<!/)href=\"viewonline.html(.*)'", "'(?<!/)href=\"/viewonline.html(.*)'", "'(?<!/)href=\"\./viewonline.html(.*)'", "'(?<!/)href=\'viewonline.html(.*)'", "'(?<!/)href=\'/viewonline.html(.*)'", "'(?<!/)href=\'\./viewonline.html(.*)'",
"'(?<!/)href=\"faq.html(.*)'", "'(?<!/)href=\"/faq.html(.*)'", "'(?<!/)href=\"\./faq.html(.*)'", "'(?<!/)href=\'faq.html(.*)'", "'(?<!/)href=\'/faq.html(.*)'", "'(?<!/)href=\'\./faq.html(.*)'",
"'(?<!/)href=\"login_security.html(.*)'", "'(?<!/)href=\"/login_security.html(.*)'", "'(?<!/)href=\"\./login_security.html(.*)'", "'(?<!/)href=\'login_security.html(.*)'", "'(?<!/)href=\'/login_security.html(.*)'", "'(?<!/)href=\'\./login_security.html(.*)'",
"'(?<!/)href=\"memberlist.html(.*)'", "'(?<!/)href=\"/memberlist.html(.*)'", "'(?<!/)href=\"\./memberlist.html(.*)'", "'(?<!/)href=\'memberlist.html(.*)'", "'(?<!/)href=\'/memberlist.html(.*)'", "'(?<!/)href=\'\./memberlist.html(.*)'",

"'-sid-". $userdata['session_id'] ."'");

$out = array(
"href=\"". str_replace('.php', '.html', $file) ."",
"". str_replace('.php', '.html', $file) ."-",
"". str_replace('.php', '.html', $file) ."-\\1-\\2",
"". str_replace('.php', '.html', $file) ."-\\1-\\2-\\3-\\4",
"". str_replace('.php', '.html', $file) ."-\\1-\\2-\\3-\\4",
"". str_replace('.php', '.html', $file) ."-\\1-\\2-\\3-\\4-\\5-\\6",
"". str_replace('.php', '.html', $file) ."-\\1-\\2-\\3-\\4-\\5-\\6",
"",

"href=\"main.html\\1", "href=\"/main.html\\1", "href=\"./main.html\\1", "href='main.html\\1", "href='/main.html\\1", "href='./main.html\\1",
"href=\"forums.html\\1", "href=\"/forums.html\\1", "href=\"./forums.html\\1", "href='forums.html\\1", "href='/forums.html\\1", "href='./forums.html\\1",
"href=\"topics.html\\1", "href=\"/topics.html\\1", "href=\"./topics.html\\1", "href='topics.html\\1", "href='/topics.html\\1", "href='./topics.html\\1",
"href=\"groups.html\\1", "href=\"/groups.html\\1", "href=\"./groups.html\\1", "href='groups.html\\1", "href='/groups.html\\1", "href='./groups.html\\1",
"href=\"messages.html\\1", "href=\"/messages.html\\1", "href=\"./messages.html\\1", "href='messages.html\\1", "href='/messages.html\\1", "href='./messages.html\\1",
"href=\"profiles.html\\1", "href=\"/profiles.html\\1", "href=\"./profiles.html\\1", "href='profiles.html\\1", "href='/profiles.html\\1", "href='./profiles.html\\1",
"href=\"sessions.html\\1", "href=\"/sessions.html\\1", "href=\"./sessions.html\\1", "href='sessions.html\\1", "href='/sessions.html\\1", "href='./sessions.html\\1",
"href=\"online.html\\1", "href=\"/online.html\\1", "href=\"./online.html\\1", "href='online.html\\1", "href='/online.html\\1", "href='./online.html\\1",
"href=\"questions.html\\1", "href=\"/questions.html\\1", "href=\"./questions.html\\1", "href='questions.html\\1", "href='/questions.html\\1", "href='./questions.html\\1",
"href=\"security.html\\1", "href=\"/security.html\\1", "href=\"./security.html\\1", "href='security.html\\1", "href='/security.html\\1", "href='./security.html\\1",
"href=\"members.html\\1", "href=\"/members.html\\1", "href=\"./members.html\\1", "href='members.html\\1", "href='/members.html\\1", "href='./members.html\\1",

"". $sessions_out ."");

$to_change = preg_replace($in, $out, $to_change);
}
}
}
return $to_change;
}
@closedir($file_listing);
#====
#==== Author: aUsTiN [austin@phpbb-amod.com] [http://phpbb-tweaks.com] = |
#==== End: ==== Dynamic Rewrite ======================================== |
#======================================================================= |

-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------

-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------

includes/page_tail.php

-----------------------------------
----[ FIND ]-----------------------
-----------------------------------

//
// Close our DB connection.
//
$db->sql_close();

-----------------------------------
----[ AFTER, ADD ]-----------------
-----------------------------------

#======================================================================= |
#==== Start: == Dynamic Rewrite ======================================== |
#==== v1.0.0 =========================================================== |
#====
$page = ob_get_contents();
ob_end_clean();
echo dynamic_rewrite($page);
#====
#==== Author: aUsTiN [austin@phpbb-amod.com] [http://phpbb-tweaks.com] = |
#==== End: ==== Dynamic Rewrite ======================================== |
#======================================================================= |

-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------

-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------

.htaccess

-----------------------------------
----[ ADD BEFORE ALL CODES ]-------
-----------------------------------

Options +FollowSymLinks
RewriteBase /
RewriteEngine On
RewriteRule ^main.html(.*) index.html$1 [NC]
RewriteRule ^forums.html(.*) viewforum.html$1 [NC]
RewriteRule ^topics.html(.*) viewtopic.html$1 [NC]
RewriteRule ^groups.html(.*) groupcp.html$1 [NC]
RewriteRule ^messages.html(.*) privmsg.html$1 [NC]
RewriteRule ^profiles.html(.*) profile.html$1 [NC]
RewriteRule ^sessions.html(.*) login.html$1 [NC]
RewriteRule ^online.html(.*) viewonline.html$1 [NC]
RewriteRule ^questions.html(.*) faq.html$1 [NC]
RewriteRule ^security.html(.*) login_security.html$1 [NC]
RewriteRule ^members.html(.*) memberlist.html$1 [NC]

RewriteRule ^(.*).html-(.*)-(.*)-(.*)-(.*)-(.*)-(.*) /$1.php?$2=$3&$4=$5&$6=$7 [NC]
RewriteRule ^(.*).html-(.*)-(.*)-(.*)-(.*) /$1.php?$2=$3&$4=$5 [NC]
RewriteRule ^(.*).html-(.*)-(.*) /$1.php?$2=$3 [NC]
RewriteRule ^(.*).html-(.*) /$1.php?$2 [NC]
RewriteRule ^(.*).html /$1.php [L]

-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------
En son BaRaN tarafından, 19.06.2006, 17:09 tarihinde değiştirildi, toplamda 1 değişiklik yapıldı.
Kullanıcı avatarı
BaRaN
Üye
Üye
 
İleti: 16
Kayıt: 23.10.2005, 10:16
Konum: İstanbul

İleti

Matmazella
13.06.2006, 19:04

lütfen mod adı, mod sürümü, phpbb sürümünü de belirtiniz ve bunu alışkanlık haline getiriniz
Kullanıcı avatarı
Matmazella
Site Yöneticisi
Site Yöneticisi
 
İleti: 2563
Kayıt: 30.06.2005, 09:08

İleti BaRaN 14.06.2006, 15:41

Mod Adı : Dynamic Rewrite
Mod Sürümü: v1.0.0
PhpBB Sürümü: Denenlere göre 2.0.21 de çalışır durumda...
Kullanıcı avatarı
BaRaN
Üye
Üye
 
İleti: 16
Kayıt: 23.10.2005, 10:16
Konum: İstanbul

İleti BaRaN 23.06.2006, 11:15

Ya sanırım ben bu .htaccess klasöründe bi hata yapıyorum düzenlemesini yaptım kendi formuma göre ama yine olmuyor konu başlıklarına tıklayınca ulaşamıyorum o bölüme kodlamanın neresi yanlış sizce
Kod: Tümünü seç
Options +FollowSymLinks
RewriteBase /forum
RewriteEngine On
RewriteRule ^main.html(.*) index.php$1 [NC]
RewriteRule ^forums.html(.*) viewforum.php$1 [NC]
RewriteRule ^topics.html(.*) viewtopic.php$1 [NC]
RewriteRule ^groups.html(.*) groupcp.php$1 [NC]
RewriteRule ^messages.html(.*) privmsg.php$1 [NC]
RewriteRule ^profiles.html(.*) profile.php$1 [NC]
RewriteRule ^sessions.html(.*) login.php$1 [NC]
RewriteRule ^online.html(.*) viewonline.php$1 [NC]
RewriteRule ^questions.html(.*) faq.php$1 [NC]
RewriteRule ^security.html(.*) login_security.php$1 [NC]
RewriteRule ^members.html(.*) memberlist.php$1 [NC]

RewriteRule ^(.*).html-(.*)-(.*)-(.*)-(.*)-(.*)-(.*) /$1.php?$2=$3&$4=$5&$6=$7 [NC]
RewriteRule ^(.*).html-(.*)-(.*)-(.*)-(.*) /$1.php?$2=$3&$4=$5 [NC]
RewriteRule ^(.*).html-(.*)-(.*) /$1.php?$2=$3 [NC]
RewriteRule ^(.*).html-(.*) /$1.php?$2 [NC]
RewriteRule ^(.*).html /$1.php [L]
Kullanıcı avatarı
BaRaN
Üye
Üye
 
İleti: 16
Kayıt: 23.10.2005, 10:16
Konum: İstanbul

Re: Değişik Bir Seo Uygulaması Hakkında

İleti NEFRİT 27.04.2008, 18:47

Kullandığın serverda rewrite modülü yüklü olmayabilir ve .html ye çevrilmiş .php sayfa bulunamaz
Kullanıcı avatarı
NEFRİT
Üye
Üye
 
İleti: 287
Kayıt: 17.03.2006, 01:14
Konum: Elazığ


Arama Motoru Optimizasyonu



Kimler çevrimiçi

Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir

cron