I've come up with the below config using mod_ext_filter which isn't desirable, but it's the only thing I've been able to come up with so far. It's not working exactly yet. Any suggestions?
SetEnvIf HTTP_COOKIE "USER_TYPE=test" FILTER=$1
Inside VirtualHost:
ExtFilterDefine doug mode=output intype=text/html enableenv=FILTER \
cmd="/bin/bash /apps/httpd/scripts/replace.sh"
<Location />
SetOutputFilter doug
</Location>
replace.sh
#!/bin/bash
/bin/sed -r 's/http\:\/\//https\:\/\//g'
On Wed, Apr 16, 2014 at 10:23 AM, Doug Strick <douglas.strick@xxxxxxxxx> wrote:
Hello,I'm looking for a way to modify the data on outgoing requests conditionally. I've tried using mod_substitute, but that appears to be an all or nothing module. The documentation for mod_filter says it can be invoked on environment variables, but it's not exactly clear on the valid syntax for those variables. Basically, I'm looking for a way to change all links from HTTP to HTTPS in my outgoing responses for users with a specific cookie. Any suggestions? Thanks