昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期四, 二月 27, 2020

How to Fix Yoasts WordPress SEO Sitemap 404 Error

Just installed Yoasts and enabled sitemap. But then encountered 404 issue.

To fix it, it's not easy, you need to have access to the php code.

edit .htaccess in your wordpress root folder, add following code

[php]
<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>

[/php]

reference:

--
Feng

没有评论:

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.