Yoast Sitemap URL not being replaced
I absolutely love this plugin, and have successfully exported my site several times. Thank you! I have noticed an issue - which may be my fault or an issue with the plugin - not quite sure.
When exporting my site locally (via zip or subdirectory), WP2Static is successfully grabbing all my sitemap files (ex: sitemap_index.xml). However, there is a URL inside this file (first line) which is not replaced with the destination URL (https://www.joy-media.org/).
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//joy-media.local/wp-content/plugins/wordpress-seo/css/main-sitemap.xsl"?>
The href attribute URL is still pulling my local domain, rather than the destination URL.
Is this something I can fix within the plugin settings or do you have any suggestions on how to fix?
- 4 replies
- Leon Stafford @leonstafford2019-01-07 19:28:02.711Z
Thanks for using the plugin and glad it's working well for you!
Looking at that link, I think it may be a big in the plugin not detecting/properly rewriting the "protocol relative URL", ie a URL starting with
Is this a Yoast generated sitemap or another?
If you can override that and use a protocol specific URL, starting with http or https (whichever your dev site uses), this should be properly rewritten.
Please let me know if having any issues trying to change that and will do my best to help.
Yep - this is an auto-generated Yoast sitemap - I'm not sure I have any way to edit it.
I could manually go in and change that URL every time after I export the site, but that would be a hassle. Is there a way to add a custom rewrite for this URL type within WP2Static settings?
- Leon Stafford @leonstafford2019-01-08 16:23:56.787Z
Sorry for the delayed response, having a rainy slow day here.
I've created an issue here which I'll get out in the next release, with a few other small bugfixes.
Any of those protocol relative links should be getting rewritten everywhere. They used to be caught with a different method in earlier versions of the plugin, but that particular area was improved(?) to fix a few other things, automatic tests weren't there to catch the breakage it seems to have caused for this type of link.
I'll get that sorted and try to get more auto-tests in to ensure all rewrite functionality remains consistent between releases.