Sitemap auto generation fails because I use 'base' tag

72 views Asked by At

I use the 'base' tag in html files of my website, in order to have more readable links. The problem is that when I use an online sitemap generator, they are not using the base url that I provide to construct the links but the current address of every page. So the links are all wrong.

For example, in this page:

http://example.com/page/one/

if there is a link like that:

<a href='page/two/'>something</a>

then the result in sitemap file will be:

http://example.com/page/one/page/two/

As you can see it appends the link to the page address and not to the base url that I provide. Is there a solution to that?

0

There are 0 answers