[Xitami] Emulating Apache directories

Francis Turner xitami@lists.xitami.org
Fri, 07 Dec 2001 12:23:09 +0100


One useful thing that you can do in Apache is display a README file at 
the bottom of a directory listing. I tried to do the same thing using 
GSL in xitami and it works most of the time (code below). Where it 
doesn't work is where the directory is an alias to somewhere.

But there is one problemette. Xitami doesn't seem to give me the real 
directory path only the url path so I'm having to hack that to try and 
create the fully qualified filename I want to include in the listing. I 
had a look in the source and it looks like the function in smthttpl.c 
called http_list_directory is the what creates the xml tree for the 
script and it unfortunately doesn't seem to put such a variable in the tree.

Francis
-------

.readme = 'c:/xitami/webpages'+urlbase+'README'
.if exists (readme)
Readme file: 'README'
  <pre>
.  literal from readme
  </pre><hr>
.elsif exists (readme+'.txt')
Readme file: 'README.txt'
  <pre>
.  literal from readme+'.txt'
  </pre><hr>
.endif


Francis

-- 
"Education is when you read the fine print; 
  experience is what you get when you don't." Pete Seeger