Is freehg.org code available?
Jesper Noehr
jesper at noehr.org
Fri Jul 4 08:56:36 CDT 2008
On Jul 4, 2008, at 3:53 PM, Ondrej Certik wrote:
> On Fri, Jul 4, 2008 at 12:45 PM, Jesper Noehr <jesper at noehr.org>
> wrote:
>> On Jul 3, 2008, at 10:25 PM, Ondrej Certik wrote:
>>>
>>> On Thu, Jul 3, 2008 at 9:57 PM, Ondrej Certik <ondrej at certik.cz>
>>> wrote:
>>>>
>>>> On Thu, Jul 3, 2008 at 8:38 PM, Dirkjan Ochtman
>>>> <dirkjan at ochtman.nl>
>>>> wrote:
>>>>>
>>>>> Ondrej Certik <ondrej <at> certik.cz> writes:
>>>>>>
>>>>>> Could the answer to all my problems be, that I also need to setup
>>>>>> hgwebdir somehow? And tell apache to redirect shortlog,
>>>>>> changelog etc.
>>>>>> to it? And tell it to use templates from the hgtemplates/freehg
>>>>>> directory?
>>>>>
>>>>> Yeah, that would make sense, I guess.
>>>>
>>>> Yes, I made a huge progress, now it almost does what it should, but
>>>> now I am struggling with apache directives. If anyone could post
>>>> here
>>>> his apache config file, it would spare me a lot of time to figure
>>>> things out.
>>
>> [...]
>>
>>> etc. Only addresses of the exact form of
>>> "http://freehg.sympy.org/u/a/test/" and
>>> "http://freehg.sympy.org/u/a/test/edit/" should be skipped. I am
>>> giving up for today, will try some other time again. If you know how
>>> to do it, I would be very happy. :)
>>
>> You should be able to use RewriteCond[1] in combination with a regex
>> catching urls ending with the patterns you want to skip, e.g.
>>
>> RewriteCond %{REQUEST_URI} !edit/$
>> RewriteCond %{REQUEST_URI} !delete/$
>
> Thanks a lot Jesper. It turned out I need to use:
>
> RewriteCond %{QUERY_STRING} .+
> RewriteRule /u(/.*) /home/ondra/repos/freehg/web/hgwebdir.cgi$1
I think the above rule is redundant. It basically matches *anything*,
which is not necessary as the rule below catches everything that is
not matched by the 3 conditionals.
> RewriteCond %{REQUEST_URI} !u/([^/]+)/([^/?]+)/?$
> RewriteCond %{REQUEST_URI} !u/([^/]+)/([^/?]+)/edit/?$
> RewriteCond %{REQUEST_URI} !u/([^/]+)/([^/?]+)/delete/?$
> RewriteRule /u(/.*) /home/ondra/repos/freehg/web/hgwebdir.cgi$1
> <Directory "/home/ondra/repos/freehg/web/">
> Order allow,deny
> Allow from all
> AllowOverride All
> SetHandler None
> Options ExecCGI
> AddHandler cgi-script .cgi
> </Directory>
Jesper
More information about the Mercurial
mailing list