[Moin-user] modifying wiki links

George Dinwiddie gdinwiddie at gmail.com
Fri Nov 17 22:39:23 EST 2006

I've done some more debugging on this, and seem to have found the 
problem.  I had to comment out the lines

         # This may happen when using mod_python
         #if scriptAndPath.startswith(location):
         #    self.path_info = scriptAndPath[len(location):]

in request.py (about line 509 in version 1.5.6). Since I'm not using 
mod_python, I'm assuming it's OK. The problem is that it was leaving the 
".fcg/" prepended to the pagename in the path_info variable.


  - George

George Dinwiddie wrote:
> By poking through request.py, I found that I can set a header in the 
> request to provide the external name of the script:
> RequestHeader set X-Moin-Location /moin/
> This *does* create the proper URLs.  All pages now display the 
> FrontPage, however.  My URL rewriting looks like:
> ReWriteRule ^moin$ moin.fcg
> ReWriteRule ^moin/(.*) moin.fcg/$1
> This works fine without the X-Moin-Location header.  Any ideas why the 
> page name might be getting lost?
>  - George
> George Dinwiddie wrote:
>> I'm moving from a dedicated server to a shared server, but trying to 
>> duplicate the external appearances.  On my dedicated server, I use
>>    ScriptAlias /moin /var/moin/mywikiname/moin.cgi
>> to simplify the URL and point to the script.  On the shared server, I 
>> can't use ScriptAlias because I don't have access to the httpd.conf 
>> and must use .htaccess, instead.  I've achieved partial success with
>>    ReWriteEngine on
>>    ReWriteRule ^moin moin.cgi
>>    ReWriteRule ^moin/(.*) moin.cgi/$1
>> This works fine if I type in the url 
>> http://mydomain.com/moin/FrontPage but if I click a link on the wiki, 
>> the form is http://mydomain.com/moin.cgi/FrontPage
>> I *know* I've seen instructions for changing the way Moin generates 
>> these links, but now that I need it, my searches are coming up empty. 
>> How do I get rid of the ".cgi" portion of the link?
>>   - George

   * George Dinwiddie *                    gdinwiddie at idiacomputing.com
   Software Development                    http://www.idiacomputing.com
   Consultant and Coach                    http://www.agilemaryland.org

More information about the Moin-user mailing list