Substituting text in the HTTP request body with mod_substitute

While doing a bit of research tonight I came across a reference to mod_substitute. This nifty module allows you to substitute text in the HTTP request body, which provides an easy way to do things similar to the following:

<Location /private>
    AddOutputFilterByType SUBSTITUTE text/html
    Substitute s/SECRET/XXXXX/ni
</Location>

I digs me some Apache!

2 Comments

Jeff Higham  on August 7th, 2008

Do you know if this module can also be used to rewrite header information?

joe  on June 5th, 2011

i am afraid it substitutes in the RESPONSE body rather than the REQUEST body.

Leave a Comment