Problem with relative URLs in RSS feed
This is an open discussion with 2 replies, filed under XSLT.
Search
In entries I almost always use relative URLs beginning with a forward slash (so they are relative to the domain). In RSS feeds I use ninja XSLT to look for anchor href attributes beginning with a slash and I append the root string to them, making them absolute.
Thanks. I’ll give it a try.
Create an account or sign in to comment.
I include the base tag,
<base href="{$root}/"/>
, in my master.xsl file so that my URLs will be portable between my development site and my public site. This worked well until I added an RSS feed. The links inside entries in the feed are incorrect. It makes them relative to the RSS page instead of the site root.I found two threads in this forum that discuss this issue but they both conclude that the base tag can’t be used in an RSS feed. Does anyone know of another way to handle this?
The threads are here and here.