• 27-06-2023, 18:58:38
    #1
    👑 UK ŞİRKETİ KUR 👑
    Merhaba mesela sitem x.com ingilizce dil Türkiye ip ile biri girince x.co./tr ye atsın oto istiyorum bunu nasıl yapabilirim
  • 27-06-2023, 19:01:01
    #2
    En kolayı tarayıcı diline göre yönlendirme olur hocam.
  • 27-06-2023, 19:01:59
    #3
    👑 UK ŞİRKETİ KUR 👑
    Misafir adlı üyeden alıntı: mesajı görüntüle
    En kolayı tarayıcı diline göre yönlendirme olur hocam.
    Nasıl yapabilirim hocam
  • 27-06-2023, 19:05:46
    #4
    $userLanguage = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
    
    
    if (strpos($userLanguage, 'tr') === 0) {
      
        header('Location: http://example.com/tr');
        exit;
    } elseif (strpos($userLanguage, 'en') === 0) {
       
        header('Location: http://example.com/en');
        exit;
    } elseif (strpos($userLanguage, 'es') === 0) {
      
        header('Location: http://example.com/es');
        exit;
    } else {
        
        header('Location: http://example.com/default');
        exit;
    }
    • YEF DİGİTAL
    YEF DİGİTAL bunu beğendi.
    1 kişi bunu beğendi.