Index | Thread | Search

From:
Mischa <openbsd@mlst.nl>
Subject:
Re: httpd unable to match on /?
To:
Tech <tech@openbsd.org>
Date:
Tue, 12 May 2026 09:56:49 +0200

Download raw body.

Thread
On 2026-05-11 22:34, Kirill A. Korinsky wrote:
> On Mon, 11 May 2026 20:06:53 +0200,
> Mischa <openbsd@mlst.nl> wrote:
>> 
>> > Anyway, I not sure that matching by GET parameters in locaiton is good
>> > idea.
>> 
>> Where should they be matched?
>> 
> 
> I don't see any easy way to match by location in httpd.
> 
> In relayd you have this one:
> 
>      path option [key [value value]]
>              Look up the entity as a value in the URL path when using 
> the http
>              protocol.  This type is only available with the direction
>              request.  The key will match the path of the requested URL
>              without the hostname and query and the value will match 
> the
>              complete query, for example:
> 
>                    block path "/index.html"
>                    block path "/cgi-bin/t.cgi" value "foo=bar*"

Is there a wau to return a new path in the response?
Looking at the manual it might seem to be able but haven't tried to 
figure it out yet.

The reason for the redirect on ?cat= is that I am hosting a website for 
a journalist who passed away, she has a wordpress website which I want 
to convert to static html to be able to keep it running for the next 10 
years.

Preference is of course relayd/httpd. :)

Mischa