• 09-04-2007, 16:47:23
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    ############################################################## 
    ## MOD Title: phpBB google keyword URLs 1.1.0 
    ## MOD Author: webmedic (bah@webmedic.net) <Brook Hyumphrey> http://www.webmedic.net 
    ## Original code from: http://www.webmasterbrain.com/forum/question-static-sef-urls-for-phpbb-vt34.php 
    ## MOD Description: This mod makes static URLs for phpBB 
    ## Please read the author notes BEFORE using this mod. 
    ## Check http://www.webmedic.net/released-phpbb-google-keyword-urls-110-vt2577.html 
    ## for the latest version or to get help with this MOD 
    ## 
    ## MOD Version: 1.1.0 
    ## 
    ## Installation Level: (Advanced) 
    ## Installation Time: 5 Minutes 
    ## Files To Edit: (3) 
    ## page_header.php, 
    ## page_footer.php, 
    ## .htaccess 
    ## Included Files: n/a 
    ############################################################## 
    ## Author Notes: 
    ## Use this mod together with the manage bots mod already included with integramod 
    ## Make backups and test this on a test forum if you can. This is not a typical mod. 
    ## This version is not like all the other mod rewrite and search engine optimization mods 
    ## out there. It will make your urls into keword phrases. to do this it rewrites the url 
    ## to look like the topic or forum title. 
    ## To see this mod in action please goto: 
    ## http://www.webmedic.net/index.php 
    ## 
    ############################################################## 
    ## MOD History: 
    ## 
    ## 2004-11-03 - Version 1.1.0 
    ## - Added replacements for /, \, and foriegn character sets. 
    ## 
    ## 2004-08-22 - Version 1.0.0 
    ## - Initial public release. 
    ## 
    ############################################################## 
    ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
    ############################################################## 
     
     
    # 
    #-----[ OPEN ]------------------------------------------ 
    # 
     
    includes/page_header.php 
     
    # 
    #-----[ FIND ]------------------------------------------ 
    # 
     
    $template->set_filenames(array( 
    'overall_header' => ( empty($gen_simple_header) ) ? 'overall_header.tpl' : 'simple_header.tpl') 
    ); 
     
    # 
    #-----[ AFTER, ADD ]------------------------------------------ 
    # 
     
    ob_start(); 
     
     
    function make_url_friendly($url) 
    { 
     
    $url = strtolower($url); 
     
    $find = array(' ', 
    '&', 
    '\r\n', 
    '\n', 
    '/', 
    '\\', 
    '+'); 
     
    $url = str_replace ($find, '-', $url); 
     
    $find = array(' ', 
    'é', 
    '&egrave;', 
    'ë', 
    '&ecirc;'); 
     
    $url = str_replace ($find, 'e', $url); 
     
    $find = array(' ', 
    'ó', 
    '&ograve;', 
    'ô', 
    'ö'); 
     
    $url = str_replace ($find, 'o', $url); 
     
    $find = array(' ', 
    'á', 
    '&agrave;', 
    'â', 
    'ä'); 
     
    $url = str_replace ($find, 'a', $url); 
     
    $find = array(' ', 
    'í', 
    '&igrave;', 
    'î', 
    '&iuml;'); 
     
    $url = str_replace ($find, 'i', $url); 
     
    $find = array(' ', 
    'ú', 
    '&ugrave;', 
    '&ucirc;', 
    'ü'); 
     
    $url = str_replace ($find, 'u', $url); 
     
    $find = array('/[^a-z0-9\-<>]/', 
    '/[\-]+/', 
    '/<[^>]*>/'); 
     
    $repl = array('', 
    '-', 
    ''); 
     
    $url = preg_replace ($find, $repl, $url); 
     
    return $url; 
     
    } 
     
     
    function rewrite_urls($content) 
    { 
     
    function if_query($amp) 
    { 
     
    if($amp != '') 
    { 
    return '&'; 
    } 
     
    } 
     
    $url_in = array('/(?<!\/)modules.php\?name=Forums&file=viewforum&f=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e', 
    '/(?<!\/)modules.php\?name=Forums&file=viewtopic.php&p=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e', 
    '/(?<!\/)modules.php\?name=Forums&file=viewtopic.php$t=([0-9]+)((&amp;)|(&)){0,1}([^>]+>)(.*?)<\/a>/e'); 
     
    $url_out = array("make_url_friendly('\\6') . '-vf\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'", 
    "make_url_friendly('\\6') . '-vp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'", 
    "make_url_friendly('\\6') . '-vt\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'"); 
     
    $content = preg_replace($url_in, $url_out, $content); 
     
    return $content; 
     
    } 
     
    # 
    #-----[ OPEN ]------------------------------------------ 
    # 
     
    includes/page_tail.php 
     
    # 
    #-----[ FIND ]------------------------------------------ 
    # 
     
    $template->pparse('overall_footer'); 
    CloseTable(); 
     
    # 
    #-----[ ABOVE, ADD ]------------------------------------------ 
    # 
     
     
    $contents = ob_get_contents(); 
    ob_end_clean(); 
    echo rewrite_urls($contents); 
     
     
    # 
    #-----[ OPEN ]------------------------------------------ 
    # 
     
     
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
    #
    htaccess doyanız böyle olmak zorunda.
    RewriteEngine On
    #this may cause issues with subdirs and so I have not enabled it.
    #RewriteBase /
    RewriteRule [.]*-vf([0-9]*) modules.php?name=Forums&file=viewforum&%{QUERY_STR ING}&f=$1
    RewriteRule [.]*-vp([0-9]*) modules.php?name=Forums&file=viewtopic&%{QUERY_STR ING}&p=$1
    RewriteRule [.]*-vt([0-9]*) modules.php?name=Forums&file=viewtopic&%{QUERY_STR ING}&t=$1
    RewriteRule [.]*-vc([0-9]*) modules.php?name=Forums&file=index&%{QUERY_STRING} &c=$1
    RewriteRule [.]*-md([0-9a-zA-Z_-]*) modules.php?name=$1&%{QUERY_STRING}
    RewriteRule [.]*-ac([0-9]*) modules.php?name=Forums&file=album_cat&%{QUERY_STR ING}&cat_id=$1
    RewriteRule [.]*-at([0-9]*) modules.php?name=Forums&file=album_thumbnail&%{QUE RY_STRING}&pic_id=$1
    RewriteRule [.]*-apic([0-9]*) modules.php?name=Forums&file=album_pic&%{QUERY_STR ING}&pic_id=$1
    RewriteRule [.]*-apm([0-9]*) modules.php?name=Forums&file=album_picm&%{QUERY_ST RING}&pic_id=$1
    RewriteRule [.]*-full-asp([0-9]*) modules.php?name=Forums&file=album_showpage&full=& pic_id=$1
    RewriteRule [.]*-asp([0-9]*) album_showpage.php?%{QUERY_STRING}&pic_id=$1
    RewriteRule [.]*-aper([0-9]*) album_personal.php?%{QUERY_STRING}&user_id=$1
    RewriteRule [.]*-dc([0-9]*) dload.php?%{QUERY_STRING}action=category&cat_id=$1
    RewriteRule [.]*-df([0-9]*) dload.php?%{QUERY_STRING}action=file&file_id=$1
    RewriteRule [.]*-kbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1
    RewriteRule [.]*-kba([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1
    RewriteRule [.]*-kbsmp kb.php?mode=stats&stats=mostpopular
    RewriteRule [.]*-kbstr kb.php?mode=stats&stats=toprated
    RewriteRule [.]*-kbsl kb.php?mode=stats&stats=latest
    RewriteRule [.]*-pbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1
    RewriteRule [.]*-pa([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1
    RewriteRule [.]*-psmp kb.php?mode=stats&stats=mostpopular
    RewriteRule [.]*-pstr kb.php?mode=stats&stats=toprated
    RewriteRule [.]*-pbsl kb.php?mode=stats&stats=latest
    [/code]

    Forum Urleriniz Phpbb seosu gibi oluyor.
  • 12-04-2007, 16:36:28
    #2
    Eposta Aktivasyonu Gerekmekte
    ya arkadas yapamadim ben bu olayi cozemewdim sac kalmadi kafada deli olacam yav off off
  • 15-04-2007, 18:36:11
    #3
    Valla Bendede Olmadı Server İnternational Error ( Http İc Sunucu Hatası) Veriyor..
  • 25-06-2007, 14:10:39
    #4
    Üyeliği durduruldu
    bu kadar ki$i htaccess dosyasına yazılacak olan kod hatasını farkedememişsiniz

    Alıntı
    RewriteRule [.]*-vf([0-9]*) modules.php?name=Forums&file=viewforum&%{QUERY_STR ING}&f=$1
    RewriteRule [.]*-vp([0-9]*) modules.php?name=Forums&file=viewtopic&%{QUERY_STR ING}&p=$1
    RewriteRule [.]*-vt([0-9]*) modules.php?name=Forums&file=viewtopic&%{QUERY_STR ING}&t=$1
    RewriteRule [.]*-vc([0-9]*) modules.php?name=Forums&file=index&%{QUERY_STRING} &c=$1
    RewriteRule [.]*-md([0-9a-zA-Z_-]*) modules.php?name=$1&%{QUERY_STRING}
    RewriteRule [.]*-ac([0-9]*) modules.php?name=Forums&file=album_cat&%{QUERY_STR ING}&cat_id=$1
    RewriteRule [.]*-at([0-9]*) modules.php?name=Forums&file=album_thumbnail&%{QUE RY_STRING}&pic_id=$1
    RewriteRule [.]*-apic([0-9]*) modules.php?name=Forums&file=album_pic&%{QUERY_STR ING}&pic_id=$1
    RewriteRule [.]*-apm([0-9]*) modules.php?name=Forums&file=album_picm&%{QUERY_ST RING}&pic_id=$1

    {QUE RY_STRING}

    etiketlerindeki hatayı düzeltirseniz sorun kalmaz. QUE RY yazılmış QUERY yaparsanız sorun kalmaz. bu kadar BASİT