/ Zope / Apsis / Pound Mailing List / Archive / 2008 / 2008-06 / Pattern Substitution

[ << ] [ >> ]

[ FW: [Pound Mailing List] RPC over https ... ] [ FAQ 3.3 clarification request / Paul A Sand ... ]

Pattern Substitution
Fat Bear Incorporated - Pound Mailing List <pound(at)fatbear.com>
2008-06-07 17:48:27 [ FULL ]
Since Pound can use patterns in directives such as HeadRequire, it seems 
reasonable (and consistent with programs such as sed) that portions of 
the matched pattern can be used in the actions.  For example, I want to 
have:

ListenHTTP
...
    Service
        HeadRequire "Host:serveradmin\.\(.*\)"
        Redirect "https://serveradmin.\1"
    End
End

The immediate need is to redirect http to https for the subdomain 
serveradmin for all virtual domains, but a general facility for using 
portions of a pattern that successfully matches is common to many unix 
programs.

Can anyone tell me how I can take care of the immediate need?  And, is 
pattern substitution something that can be added to the wish list for 
future versions of Pound?

Thanks!
Steve Amerige
http://www.fatbear.com
Attachments:  
text.html text/html 1285 Bytes

MailBoxer