-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi,
I tried to use this nice module in an Sitecore 8.2 project.
But I figured out, that if a site is defined with a virtualPath (in sitedefinition) the SitemapFile-URL for the certain sitemap in sitemapindex is wrong.
Example:
<site name="Website_Germany" virtualFolder="/germany" physicalFolder="/germany" rootPath="/sitecore/content/Website Germany" startItem="/Home" ... language="de" scheme = "http" />
Result:
<?xml version="1.0" encoding="utf-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>http://website/germany/sitemaps/sitemap-website_germany-de.xml</loc> <lastmod>2017-06-07T04:35:29+02:00</lastmod> </sitemap> </sitemapindex>
This results in an 404-Error because a staticfile is requested and there is no germany-folder.
An good approach is maybe
to check if the site has any hostname
-> then use the hostname to build the URL
else
-> use the main-website configured in the configuration item if it has no virtual path or hostname or the first one which has no virtualpath