Server issue with the {B}LFS books look

M.Canales.es manuel at linuxfromscratch.org
Tue Sep 14 12:08:11 PDT 2004


Hi!

At this thread was reported an issue in the command bloks look using Mozilla and 
Opera, that affect both the LFS & BLFS books:

http://archives.linuxfromscratch.org/mail-archives/lfs-dev/2004-September/048746.html

After investigate it, I found that the problem is how the pages are served. At 
the master website dir we have and .htaccess file with that directives:

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_ACCEPT} application/xhtml\+xml
RewriteCond %{HTTP_ACCEPT} !application/xhtml\+xml\s*;\s*q=0
RewriteCond %{REQUEST_URI} \.html$
RewriteCond %{THE_REQUEST} HTTP/1\.1
RewriteRule .* - [T=application/xhtml+xml]

That mean that all pages are served like application/xhtml+xml, them a very 
restrictives rules are applied, by the browser that implement it, to render the 
pages.

For the {B}LFS books we are using tidy to validate and indent the generated 
pages. The final code for a command blok is like this:

 
      {pre class="userinput"}
{kbd class="command"}./configure --prefix=/usr{/kbd}
{/pre}

That is semantically correct, but using the application/xhtml+xml rules the 
first tag line break is added to the output (but not the last one :-?).

My propossed solution is to add an ./htaccess file in all view/ dirs to server 
the pages under that directories as plain text/html.

-- 
Manuel Canales Esparcia         
Usuario de LFS nº 2886: http://www.linuxfromscratch.org/
LFS en castellano:  http://www.escomposlinux.org/lfs-es  http://www.lfs-es.org
TLDP-ES                 http://es.tldp.org



More information about the website mailing list