CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]       2026/12/05 03:47:17

Modified files:
        usr.sbin/httpd : httpd.conf.5 httpd.h server_http.c 

Log message:
httpd: allow using captures of server match in block return and rewrite

So one server block can redirect many hosts:

server match "^(%d%d%d%d)%.eurobsdcon%.org$" {
listen on egress tls port 443
block return 302 "https://eurobsdcon.org/%1$REQUEST_URI";
}

A location match still wins over the server match. Without a group %1 is
the whole match, as for location match.

An invalid capture index such as "%20" is now kept as is instead of
failing the request, for location match too.

Requested and tested by Mischa, help from kirill@ and armani@, ok armani@

Reply via email to