Error 404 page had relative paths specified for both the image and
stylesheets which caused a problem when requested URL included a
subfolder (e.g.
http://libvirt.org/asdf/asdf ). This patch corrects
this behaviour by modifying href_base to '/' and changing the src of
the image.
---
docs/404.html.in | 2 +-
docs/site.xsl | 11 ++++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/docs/404.html.in b/docs/404.html.in
index 9363871..202cdb8 100644
--- a/docs/404.html.in
+++ b/docs/404.html.in
@@ -15,7 +15,7 @@
</ul>
<p class="image">
- <img src="libvirtLogo404.png" alt="libvirt Logo"/>
+ <img src="{$href_base}libvirtLogo404.png" alt="libvirt
Logo"/>
</p>
diff --git a/docs/site.xsl b/docs/site.xsl
index a6801e6..a65c10d 100644
--- a/docs/site.xsl
+++ b/docs/site.xsl
@@ -14,7 +14,16 @@
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&qu...
- <xsl:variable name="href_base" select="''"/>
+ <xsl:variable name="href_base">
+ <xsl:choose>
+ <xsl:when test="$pagename = '404.html'">
+ <xsl:value-of select="'/'"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="''"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<xsl:template match="/">
<xsl:apply-templates select="." mode="page">
--
1.7.8.6