Sitemap.xml returning 404
-
Hello Sybre.
I use 404 redirection to homepage with this code:
function redirect_404_error_page_to_homepage(){if($_SERVER[‘REQUEST_URI’] != ‘/sitemap.xml’ && is_404()){wp_redirect(home_url(),301); exit;}} add_action(‘wp’, ‘redirect_404_error_page_to_homepage’, 1);
I can see sitemap.xml, but only if the sitemap is unstyled (unchecked “Styl Sitemap”).
When I check option “Styl Sitemap”, sitemap is not generated.
Firefox display message “Error loading styles: XSLT style parsing failed. “.
Google Chrome display white screen.
I tryed re-saving the permalinks, but nothing change.
I don’t use EasyEngine. I use Apache.
When I delete redirection 404 on homepage, the sitemap works well even with styling.
Please, can you advice what can be done, so I can use redirects on homepage and also styling of sitemap?
Thank you,
David
- The topic ‘Sitemap.xml returning 404’ is closed to new replies.