[Moin-user] Multiple URLs to one wiki [WAS: RE: Error after changes]

Nir Soffer nirs at freeshell.org
Tue Feb 14 07:32:02 EST 2006


On 14 Feb, 2006, at 17:17, Matthew C. Miller wrote:

> So, to verify my understanding, if I have one wiki I'd like to access
> with the following six urls:
>
> http://www.example.com/abc
> http://www.example.com/AlphaBetaCo
> http://www.example.com/AlphaBetazoidCompany
> http://www.ex.com/abc
> http://www.ex.com/alphabetaco
> http://www.ex.com/alphabetazoidcompany
>
> And I call the wiki and the directory it's stored it 'abc,' then will
> this snippet in my farmconfig.py file work?
>
> base = 'www.[example|ex].com'
> wikis = [
> 	('abc', r'%s/(?:abc|alphabetaco|alphabetazoidcompany).*$' %
> base),

No, but this should work:

	base = r'www\.(?:example|ex)\.com'

:-)

You may want to consult <http://docs.python.org/lib/re-syntax.html> 
when you write your regular expressions.


> And I'll no longer need the soft-links between full names and 
> abbreviate
> ones in my config directory (ie: only abc.py will be needed, not
> abc.py
> alphabetaco.py -> abc.py
> Alphabetazoidcompany.py -> abc.py

Yes.


> -----Original Message-----
> From: Nir Soffer [mailto:nirs at freeshell.org]
> Sent: Monday, February 13, 2006 1:38 PM
> To: Matthew C. Miller
> Cc: moin-user at lists.sourceforge.net
> Subject: Re: [Moin-user] Error after changes
>
>
> On 13 Feb, 2006, at 16:45, Matthew C. Miller wrote:
>
>> I assume you mean in the farmconfig.py file, in the "wikis" section.
>>
>> Currently, I have 50 (due to multiple access URLs for the same 23
>> sites).
>>
>> Here's a copy of what's in my farmconfig.py (by the way, if there's a
>> better way to do the duplicate URLs going to the same wiki, I'd love
>> to
>> know!):
>
>
> use this:
>
> base = 'www.example.com'
>
> wikis = [
> 	(wiki1, r'%s/(?:wiki1-a|wiki1-b|wiki1-c).*$' % base),
> 	(wiki2, r'%s/(?:wiki2-a|wiki2-b|wiki2-c).*$' % base),
> 	...
> 	(wiki100, r'%s/(?:wiki100-a|wiki100-b|wiki100-c).*$' % base), ]
>
> This should let you have up to 100 wikis (Python 100 groups re limit)
> with many access points to any wiki.
>
> Best Regards,
>
> Nir Soffer
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log 
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
> _______________________________________________
> Moin-user mailing list
> Moin-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/moin-user
>
>

Best Regards,

Nir Soffer





More information about the Moin-user mailing list