• 09-02-2015, 14:36:22
    #1
    Üyeliği durduruldu
    Merhabalar, uzun bir araştırma sonucu yeni bir şey buldum ve paylaşılmadığını fark ettim ve burada paylaşma gereği duydum aşağıdaki vermiş olduğumuz kodlar ünlü Apache moderatörlerin den jdMorgan tarafından paylaşılmıştır.

    Kodun işlevi: gereksiz geniş kod parçacıklarını bulup sıkıştırmaktadır. Gzip bu işlevi yeterli katar yapıyor ancak gzip yetmeyen arkadaşlar olduğu için ek olarak bu kodları kullanabilirler.

    Kod Nereye ve Nasıl yerleştirilir?: Wordpressin kontrol panellerini kullarak veya oradan yapamazsanız Filezilla programı desteği ile .htaccess bölümüne yazdırın.

    # if this request is for any of these filetypes 
    RewriteCond $1 \.gif$ [NC,OR] 
    RewriteCond $1 \.jpg$ [NC,OR] 
    RewriteCond $1 \.ico$ [NC,OR] 
    RewriteCond $1 \.css$ [NC,OR] 
    RewriteCond $1 \.js$ [NC,OR] 
    RewriteCond $1 \.mp3$ [NC,OR] 
    RewriteCond $1 \.wav$ [NC,OR] 
    RewriteCond $1 \.pdf$ [NC,OR] 
    # or if URL resolves to existing file 
    RewriteCond %{REQUEST_FILENAME} -f [OR] 
    # or if URL resolves to existing directory 
    RewriteCond %{REQUEST_FILENAME} -d 
    # then skip the rewrite to WP 
    RewriteRule ^(.*)$ - [S=1] 
    # else rewrite the request to WP 
    RewriteRule . /index.php [L] 
    
    Whereas in a server config file but outside of any <Directory> container, you'd want: 
    
    # if this request is for any of theses filetypes 
    RewriteCond $1 \.gif$ [NC,OR] 
    RewriteCond $1 \.jpg$ [NC,OR] 
    RewriteCond $1 \.ico$ [NC,OR] 
    RewriteCond $1 \.css$ [NC,OR] 
    RewriteCond $1 \.js$ [NC,OR] 
    RewriteCond $1 \.mp3$ [NC,OR] 
    RewriteCond $1 \.wav$ [NC,OR] 
    RewriteCond $1 \.pdf$ [NC,OR] 
    # or if URL resolves to existing file 
    RewriteCond %{REQUEST_FILENAME} -f [OR] 
    # or if URL resolves to existing directory 
    RewriteCond %{REQUEST_FILENAME} -d 
    # then skip the rewrite to WP 
    RewriteRule ^/(.*)$ - [S=1] 
    # else rewrite the request to WP 
    RewriteRule ^/. /index.php [L] 
    
    These changes have to do with differences in performance of regex-ORs versus RewriteCond [OR]s* due to the fact that code in server config files is "pre-compiled" at server start-up as opposed to being interpreted on-the-fly in .htaccess, differences in the "local URL-path" as seen by the RewriteRule, and --as stated above-- the fact that mod_rewrite processing is not re-started from the top after any rule matches, as it is in .htaccess. 
    
    In your situation, this code may not be much faster that the box-stock code provided by WP. But if you serve any images, media, or document files whatsoever, it will be faster nonetheless.
  • 09-02-2015, 14:50:33
    #2
    bunu deneyen bir arkadaş var mı?
  • 09-02-2015, 15:00:13
    #3
    Kimlik doğrulama veya yönetimden onay bekliyor.
    şimdi denedim fakat herhangi + ya da- bir verim alamadım
  • 09-02-2015, 15:15:53
    #4
    Üyeliği durduruldu
    HCeylan adlı üyeden alıntı: mesajı görüntüle
    şimdi denedim fakat herhangi + ya da- bir verim alamadım
    Vermiş olduğum kodları httpd.include veya vhost.conf kısmına da eklemeyi dener misin ?
  • 09-02-2015, 15:18:24
    #5
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Konuyu takipteyim arkadaşlar. Deneyen ve performans alan olursa bende ekleyeceğim


    Tapayalk ile yazılmıştır harf veya cümle hataları için maruz görün
  • 09-02-2015, 15:33:31
    #6
    Ben ekledim denedim azda olsa hızlanma var.
  • 09-02-2015, 15:35:04
    #7
    Herhangi bir zararı veya bir dezavantajı var mıdır acaba? Özellikle bazı eklentilerde sıkıntı yaşama durumu olabilir mi?
  • 09-02-2015, 15:38:59
    #8
    ekledim bi faydasını görmedim eskisi neyse yeniside oydu bende geri kaldırdım.