I am using mod_filter on Apache httpd 2.2.15 to apply mod_include and mod_Substitute filters to content.
I am setting an environment variable based on request_URI matches to apply substitutions.
SetEnvIfNoCase Request_URI "\.html" tag=1
SetEnvIfNoCase Request_URI "\.htm" tag=1
SetEnvIfNoCase Request_URI "\/$" tag=1
This allows me to set tag=0 later on pages that I don't want to apply mod_substitute to.
My filter settup is as follows:
FilterDeclare subst TRANSCODE
FilterProvider subst SUBSTITUTE env=tag $1
FilterProtocol subst "change=yes"
FilterProtocol subst "proxy=no"
My SSI rules are as follows
FilterDeclare SSI
FilterProvider SSI INCLUDES resp=Content-Type $text/html
"FilterChain SSI subst " works for some pages but I am losing content from others. It is my understanding that I need to apply the substitute filter before SSI because some of the content that I need to substitute may be in include files.
My pages make heavy use of SSI includes and I want to apply the substitute filter to content that has already been processed by SSI.
With "FilterChain subst SSI" Everything looks OK. And it actually looks like the subst filter is being applied after the page has had all of it's included compiled.
Can anyone help me understand why "FilterChain SSI subs" drops html from some pages and why "FilterChain subst SSI" seems to actually apply the SSI filter before the subst one?
Cheers,
John