If I am reading you correctly, this might be more appropriately doable with the proxy_redirect directive of the proxy module instead.&nbsp; Check out the documentation here and give iit a try: <a href="http://wiki.codemongers.com/NginxHttpProxyModule#proxy_redirect">http://wiki.codemongers.com/NginxHttpProxyModule#proxy_redirect</a><br>
<br><div class="gmail_quote">On Thu, Jan 8, 2009 at 11:03 PM, nbubingo <span dir="ltr">&lt;<a href="mailto:nbubingo@gmail.com">nbubingo@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The http_sub_filter_module can substitue one string to another.<br>
Sometimes it dosen&#39;t work because of gzip. If the HTTP packets come from backend and the client&#39;s HTTP request header comes with &quot;Content-Encoding:gzip&quot;, then the entire packets is compressed.<br>
Maybe you can set like this: "proxy_set_header Accept-Encoding &#39;&#39;;" , but any response will not compressed any more.<br>
<br>
------------------<br>
YaoWeibin<br>
2009-01-09<br>
<br>
-------------------------------------------------------------<br>
发件人:raptium<br>
发送日期:2009-01-09 13:52:15<br>
收件人:nginx<br>
抄送:<br>
主题:http_sub_module, need help<br>
<div><div></div><div class="Wj3C7c"><br>
I am using nginx as a reverse proxy for IBM Lotus Domino Web Mail.<br>
Since there are some internal only URL in email content, I need<br>
http_sub_module to modify(add some prefix ) the URL so that user<br>
outside intranet can click the link and access through another portal.<br>
<br>
I add<br>
<br>
 &nbsp; sub_filter aaa bbb;<br>
 &nbsp; sub_filter_types application/json application/x-javascript;<br>
 &nbsp; sub_filter_once off;<br>
<br>
into the nginx.conf and it does not work.&#39;aaa&#39; is not replaced by &#39;bbb&#39;<br>
<br>
However, if I save the web page as html file or generate some json<br>
which contains &#39;aaa&#39;. It can be replace by &#39;bbb&#39;.<br>
<br>
Therefore, it there any other options besides `Content-Type` can<br>
prevent http_sub_module replacing the word?<br>
<br>
Sorry for my bad English...<br>
<br>
</div></div></blockquote></div><br>