Selamlar
dtsservis,
1. Ilk once .htaccess dosyayi acip, bu kodu en yukarisina elave et:
# WordPress SEO - XML Sitemap Rewrite Fix
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap_index\.xml$ /index.php?sitemap=1 [L]
RewriteRule ^([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
</IfModule>
# END WordPress SEO - XML Sitemap Rewrite Fix
2. Sonra ise, /wp-content/plugins/wordpress-seo/inc/class-sitemaps.php , burda bunu elave et:
/**
* Initialize sitemaps. Add sitemap rewrite rules and query var
*/
function init() {
global $wp_rewrite;
$GLOBALS['wp']->add_query_var( 'sitemap' );
$GLOBALS['wp']->add_query_var( 'sitemap_n' );
add_rewrite_rule( 'sitemap_index\.xml$', 'index.php?sitemap=1', 'top' );
add_rewrite_rule( '([^/]+?)-sitemap([0-9]+)?\.xml$', 'index.php?sitemap=$matches[1]&sitemap_n=$matches[2]', 'top' );
$wp_rewrite->flush_rules();
}
Boylece calismali...eger calismazsa... functions.php dosyayi bul, bunu elave et:
function my_404_fix() {
global $wp_query;
if (is_feed() && $wp_query->query_vars['feed'] == 'sitemap') {
status_header(200);
$wp_query->is_404=false;
}
}
add_filter('template_redirect', 'my_404_fix');Umarim ise yararlar