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
没有评论:
发表评论