[Moin-user] wiki URL

Thomas Heller theller at ctypes.org
Thu Nov 9 05:30:13 EST 2006


Thomas Heller schrieb:
> Now I've tried RewriteRule:
> 
> RewriteEngine On
> RewriteRule ^mywiki(.*)$ mywiki.cgi$1
> 
> This mostly works (http://.../mywiki or http://.../mywiki/Frontpage), but the hyperlinks that the wiki
> itself generates still point to "http://.../mywiki.cgi/Frontpage" which I find not so nice.
> Of course the urls are only rewritten in one direction...


I've finally found it.  Rewriting in the opposite direction is actually easy in the mywiki.cgi script with
this code inserted near the top:

import os
for name, value in os.environ.iteritems():
    os.environ[name] = os.environ.replace("mywiki.cgi", "mywiki", 1)

Thomas





More information about the Moin-user mailing list