apache ext_filter module not work

I need to filter some words in apache output pages.

this is my filter code:

ExtFilterDefine fixtext mode=output cmd="/bin/sed s/works/sorta/ig"

<Location />
    SetOutputFilter fixtext
</Location>

but, when I use this codes my output is like this:

‹í½{“Ü6’/ú÷Χ¨é™qµŽ\­â«²ZK»ë¸cÙ3¶wë[Á”QUTó%‚¬êÖžùî7‘ $_U’Ø»qOïŽÕMü H$&“ÉäÅï_ÿðíÏ¿þøfrÈ£pòã/ùëwßN®fÏžý»õí³g¯~=ùßÿúó÷7óÉÏ™ó ’Ø Ÿ={óöjruÈóôù³g§ÓéædÝ$ÙþÙÏv/h”sùë,×rÞø¹õòwQºH­~e®/Å?ó ÙË7Gç“ŸÝ œü[ÀN,{ñL&(`Äw“Œ…·W<?0–Mò‡”Ý^åì>æq~59dlw{usó AÏÜãÆK¢(‰o õÏùíÜœ³õj±Zx¦³Ü:[flmËZ2wn[;Ï\=ûÒß(Xöpãy%§!Ë™({,³”˜7˯àyU”iîeAšë´Þ»GW~½šðÌCŠïyUÏ(ˆoÞó«—/žIÌËÏ µÏØÃ6¹ÿb:]¬K]ï®A¸›ò´AyªÅÏÑÍ&î{÷þ‡í{øëvaøM ‘ºgø×íd熜µ!E–ÝN¦Ž?¹ÍO“ØgÙô›v¡Ÿ•ÅµÓxʘ³æóy»

can anybody help me to solve this problem??

Answer

You need to define the intype or else it will mess with everything in an undefined way.

ExtFilterDefine fixtext mode=output intype=text/html cmd="/bin/sed s/a/b/g"

<Location />
    SetOutputFilter fixtext
</Location>

Attribution
Source : Link , Question Author : vtworockman , Answer Author : Hyppy

Leave a Comment