In module's "Advanced settings" (admin/config/search/xmlsitemap/settings), set Default base URL value to a single forward slash "/", and save the configuration.

Form is saved without any error.

Once the settings page reloads, Default base URL value becomes empty; which causing the <loc> entries in sitemap.xml to be relative to the site root.

<url><loc>/node-51-article</loc><lastmod>2013-04-04T00:13Z</lastmod><changefreq>hourly</changefreq></url>
<url><loc>/node-52-article</loc><lastmod>2013-04-04T00:13Z</lastmod><changefreq>hourly</changefreq></url>
<url><loc>/node-53-article</loc><lastmod>2013-04-04T00:13Z</lastmod><changefreq>hourly</changefreq></url>
<url><loc>/node-54-article</loc><lastmod>2013-04-04T00:13Z</lastmod><changefreq>hourly</changefreq></url>

A patch will follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

osman’s picture

Status: Active » Needs review
FileSize
782 bytes

Attached patch disallows entering only a "/"

Status: Needs review » Needs work

The last submitted patch, xmlsitemap_base_url variable should not be empty-1960798-1.patch, failed testing.

osman’s picture

Status: Needs work » Needs review
FileSize
782 bytes

SimpleTest doesn't like space in filename I guess, my bad :)

Status: Needs review » Needs work

The last submitted patch, xmlsitemap_base_url_variable_should_not_be_empty-1960798-2.patch, failed testing.