• 31-10-2010, 19:01:47
    #1
    selam arkadaşlar

    şimdi benim istediğim olay wordpress ile alakalı htaccess ile alakalı ufak bir yardım istiyorum ugrastırıcı birseyse ücrette verebilirim sitemdeki tüm etiketleri sildim sitedeki silinen etiketlerin googleden girişlerde ana sayfaya yonlenmesini istiyorum örnek:
    varolan bir etiket : /tag/aaa.html
    bu aaa.html ye eger googleden giriş olursa ana sayfaya girsin site içinde tıklama olursa acılsın bunu nasıl yapabilirim ?

    konular değil sadece etiketler için olacak yonlendirme.
  • 31-10-2010, 21:32:20
    #2
    .htaccess sorucelerini bi yollarmısın kardes
  • 31-10-2010, 21:50:53
    #3
    once
    tag1.php diye bir dosya olustur. www anadizine at.

    tag1.php kodları
    <?
    function parcala($a) {
    preg_match('@^(?:http://)?([^/]+)@i',
        "$a", $matches);
    $t = $matches[1];
    preg_match('/[^.]+\.[^.]+$/', $t, $matches2);
    $a =$matches2[0];
    return $a; }
    
    $gelen = parcala($_SERVER['HTTP_REFERER']);
    $google="google.com";
    if($gelen==$google) {
    header('Location: http://www.seninsite.com/index.php');
    }
    ?>
    .htaccess deki /tag denk gelen php dosyasının adını tag1.php olarak degistir
    sorun hal olacaktır.
  • 01-11-2010, 12:14:44
    #4
    wordpress htaccess klasoru bu şekil yalnız
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
  • 01-11-2010, 12:27:09
    #5
    Üyeliği durduruldu
    e-hadi.net adlı üyeden alıntı: mesajı görüntüle
    once
    tag1.php diye bir dosya olustur. www anadizine at.

    tag1.php kodları
    <?
    function parcala($a) {
    preg_match('@^(?:http://)?([^/]+)@i',
        "$a", $matches);
    $t = $matches[1];
    preg_match('/[^.]+\.[^.]+$/', $t, $matches2);
    $a =$matches2[0];
    return $a; }
    
    $gelen = parcala($_SERVER['HTTP_REFERER']);
    $google="google.com";
    if($gelen==$google) {
    header('Location: http://www.seninsite.com/index.php');
    }
    ?>
    .htaccess deki /tag denk gelen php dosyasının adını tag1.php olarak degistir
    sorun hal olacaktır.
    bu şekilde /tag dizinine gelen her isteği yönlendirecektir. Arkadaş etiket yoksa yönlendirilsin istemiş. Bu koda ek olarak htaaccess dosyasında ErrorDocument 404 satırını şu şekilde değiştir:

    ErrorDocument 404 /tag1.php

    eğer böyle bir satır bulamazsan ekle : )