Thank you for the suggestion. Here is what I did
a. Archived the entire wiki.
b. created a subfolder which I called dw2. e.g.
http://example.com/dw2
c. Moved the archived content into that folder and expanded it
With that done I had a fully functional version of the wiki at
http://example.com/dw2/dokuwiki. Now the .htaccess bit
RewriteEngine On
RewriteBase /dw2/dokuwiki/
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(doku\.php/[^/]+)/?$ $1?do=export_xhtml [L,NC,QSA,R,NE]
I have found that the dokuwiki export leaves in a lot of superfluous link content along the lines of
<meta name="keywords" content="global_resources"/>
which is probably not doing any harm. However, apart from going in there and taking it out manually I see no other solution. In any case, thank you a lot for the suggestion. You have saved me a day or two of thankless drudgery.