We have a site which has multiple 301 redirects in place for pages which once existed on their own but are now redirected elsewhere using the redirect module.
These original pages no longer exist in the CMS or are unpublished.
The generated XML sitemap retains these now redirected links in the sitemap.xml file generated. An external SEO agency has instructed the client that this is bad practice and the XML sitemap entries which are 301 redirects need to be removed.
Does anyone have any ideas on how I could omit these?
Thanks,
Gary
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | xmlsitemap-remove_301_redirected_pages-2968055-10.patch | 2.04 KB | artem_sylchuk |
| #10 | interdiff_8_10.txt | 865 bytes | artem_sylchuk |
Comments
Comment #2
garyh commentedComment #3
garyh commentedComment #4
thebumik commentedI've provided an integration with Redirect. So you can easily skip the nodes/pages which are 301 redirected.
Comment #5
thebumik commentedComment #6
cyberlily commentedWhat's needed to get this patch released? Happy to help since we need it too.
Comment #7
chris matthews commentedThe patch in #4 to xmlsitemap.admin.inc and xmlsitemap.generate.inc does does not apply to the latest xmlsitemap 7.x-2.x-dev and if still applicable needs a reroll.
Comment #8
den tweed commentedRerolled
Comment #9
renatog commentedComment #10
artem_sylchukThanks for the patch.
I've tried it and it works, but redirect_fetch_rids_by_path has the third argument which controls if the disabled redirects are returned or not.
By default it returns disabled redirects too.
Updated patch to exclude the disabled ones. This also has the performance impact as the status column is the part of the index.
Comment #11
aamortimer commentedTested patch #10 and all is working for me, thanks for the patch really useful.
Comment #12
rpayanmComment #13
darrell_ulm commentedAlso tested patch #10 and appears to work.
Comment #14
darrell_ulm commentedComment #15
alex_optimGood for me too.
Comment #16
pifagor commentedComment #18
pifagor commented