• 17-01-2020, 15:36:01
    #1
    Merhabalar sunucu değişikliği sonrasında nginx kullanan bir sunucuda sitemap_index.xml uzantısında 404 hatası almaya başladım.
    Çözüm önerilerinin hepsini denedim. .htaccess dosyasına önerilen kodları eklediğimde site tamamen giderek 500 hatası vermekte.
    Bulunduğum sunucu şirketide çözüme yanaşmak yerine script üreticisi ile iletişime (!) geçmem konusunda ısrarcı.
    Bu problem hakkında çözüm önerisi olan var mıdır?
  • 17-01-2020, 15:36:44
    #2
    Üyeliği durduruldu
    Pm iletildi.
  • 17-01-2020, 15:56:57
    #3
    ngnix için rewrite kuralları farklıdır, htaccess apache için kurgulanan syntax 'e sahip.

    .conf dosyanıza şunları eklemelisiniz;

    #Yoast SEO Sitemaps
    location ~ ([^/]*)sitemap(.*).x(m|s)l$ {
    ## this rewrites sitemap.xml to /sitemap_index.xml
    rewrite ^/sitemap.xml$ /sitemap_index.xml permanent;
    ## this makes the XML sitemaps work
    rewrite ^/([a-z]+)?-?sitemap.xsl$ /index.php?yoast-sitemap-xsl=$1 last;
    rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    ## The following lines are optional for the premium extensions
    ## News SEO
    rewrite ^/news-sitemap.xml$ /index.php?sitemap=wpseo_news last;
    ## Local SEO
    rewrite ^/locations.kml$ /index.php?sitemap=wpseo_local_kml last;
    rewrite ^/geo-sitemap.xml$ /index.php?sitemap=wpseo_local last;
    ## Video SEO
    rewrite ^/video-sitemap.xsl$ /index.php?yoast-sitemap-xsl=video last;
    }
    resmi döküman : https://kb.yoast.com/kb/xml-sitemaps-nginx/
  • 17-01-2020, 16:09:53
    #4
    _PatroN_ adlı üyeden alıntı: mesajı görüntüle
    ngnix için rewrite kuralları farklıdır, htaccess apache için kurgulanan syntax 'e sahip.

    .conf dosyanıza şunları eklemelisiniz;

    #Yoast SEO Sitemaps
    location ~ ([^/]*)sitemap(.*).x(m|s)l$ {
    ## this rewrites sitemap.xml to /sitemap_index.xml
    rewrite ^/sitemap.xml$ /sitemap_index.xml permanent;
    ## this makes the XML sitemaps work
    rewrite ^/([a-z]+)?-?sitemap.xsl$ /index.php?yoast-sitemap-xsl=$1 last;
    rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    ## The following lines are optional for the premium extensions
    ## News SEO
    rewrite ^/news-sitemap.xml$ /index.php?sitemap=wpseo_news last;
    ## Local SEO
    rewrite ^/locations.kml$ /index.php?sitemap=wpseo_local_kml last;
    rewrite ^/geo-sitemap.xml$ /index.php?sitemap=wpseo_local last;
    ## Video SEO
    rewrite ^/video-sitemap.xsl$ /index.php?yoast-sitemap-xsl=video last;
    }
    resmi döküman : https://kb.yoast.com/kb/xml-sitemaps-nginx/


    Hocam öncelikle teşekkürler, iligli kodları uyguladığım zaman oluşan 500 hatasının sebebi sizce ne olabilir?
  • 17-01-2020, 16:16:24
    #5
    error loglarınızı görmemiz gerek. 500 iç sunucu hatası demek. Loglarınızdaki detayı paylaşabilirseniz, yardımcı olmaya çalışırım