Hello,

I'm trying to reject requests hitting my apache proxy which are NOT going
to *.foo.com, *.foo.com:443 or *.foo.com/blahblahblah. I'm trying to avoid
bogus requests like foo.com.baddomain.com.

The regex I'm using is:

\.foo.com(?:\:\d{2,5}|\/.*)?$

This is working exactly how I want on https://regex101.com/r/tE4pM2/1, but
when I put this into my apache config:

<If "%{REQUEST_URI} =~ /\.foo.com(?:\:\d{2,5}|\/.*)?$/">

I get the following error:

httpd[3704]: AH00526: Syntax error on line 179 of
/etc/httpd/conf/httpd.conf:
httpd[3704]: Cannot parse condition clause: Failed to compile regular
expression

Is apache limited in the regex support that it has?

httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Nov 19 2015 21:43:13

Thanks,
Brian

Reply via email to