2016-03-08 55 views
-3

我已經開發了一個WordPress的網站,我用SEO的Yoast SEO插件(https://wordpress.org/plugins/wordpress-seo/)和自定義固定鏈接(https://wordpress.org/plugins/custom-permalinks/)來定製我的鏈接。WordPress的網站地圖XML錯誤,而自定義固定鏈接使用

現在的問題既不是Yoast搜索引擎優化也不是Google Sitemap能夠在我的網站上生成網站地圖XML,它返回404錯誤。如果我禁用自定義固定鏈接插件,那麼它的作品完美。

我甚至試圖將我的Yoast SEO插件更改爲所有在一個搜索引擎優化,但問題仍然相同,Sitemap只有當自定義永久鏈接被禁用,因爲我創建自定義帖子類型,我必須使用它。

有沒有人使用這種組合並解決了這樣的問題?

問候

馬諾瑞裏

+0

您在Apache中的日誌中是否有任何錯誤? – Farside

回答

0

如果使用Yoast SEO插件,他們在其網站上這裏怎麼解決這個問題 - Apache服務器上http://kb.yoast.com/article/77-my-sitemap-index-is-giving-a-404-error-what-should-i-do

,但要確保你把這個的。在那裏的WordPress代碼之前的htacess。

# Yoast SEO - XML Sitemap Rewrite Fix 
RewriteEngine On 
RewriteBase/
RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L] 
RewriteRule ^locations.kml$ /index.php?sitemap=wpseo_local_kml [L] 
RewriteRule ^geo_sitemap.xml$ /index.php?sitemap=geo [L] 
RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?  sitemap=$1&sitemap_n=$2 [L] 
RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 [L] 
# END Yoast SEO - XML Sitemap Rewrite Fix