Some background reading on WebFinger starting at http://code.google.com/p/webfinger/wiki/WebFingerProtocol and then moving on to a few references such as http://hueniverse.com/2009/09/implementing-webfinger/ and I decided to knock up a quick and dirty static version.

An apache redirect

RewriteRule ^.well-known/host-meta lib/host-meta.xml

so that the “well known” location points to a file in here

<?xml version='1.0' encoding='UTF-8'?>
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'
     xmlns:hm='http://host-meta.net/xrd/1.0'>
  <!-- Resource-specific Information -->
  <hm:Host>ajft.org</hm:Host>hm:Host>

  <Link rel='lrdd'
        type='application/xrd+xml'
        template='http://ajft.org/webfinger/{uri}' />
g
</XRD>

Then a second rewrite rule and a MIME type declaration:

AddType application/xrd+xml .xrd
RewriteRule ^webfinger/acct:ajft@ajft.org$ lib/webfinger-ajft.xrd

so that the one and only WebFinger end point also points to a static file:

<?xml version='1.0' encoding='UTF-8'?>
<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'>
    <Subject>acct:ajft@ajft.org</Subject>
</XRD>

That should be all we need to create a bare bones implementation of WebFinger. The well-known http://ajft.org/.well-known/host-meta should return the template document, which then tells people to try http://ajft.org/webfinger/acct:ajft@ajft.org, or any other account, but only that one will return valid information.