# Multiple replacements with http\_sub\_module?

**URL:** <https://www.ruby-forum.com/t/multiple-replacements-with-http-sub-module/221995>\
**Category:** NGINX\
**Created:** [August 8, 2012, 4:26pm UTC](https://www.ruby-forum.com/t/multiple-replacements-with-http-sub-module/221995 "2012-08-08T16:26:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 8, 2012, 4:26pm UTC](https://www.ruby-forum.com/t/multiple-replacements-with-http-sub-module/221995/1 "2012-08-08T16:26:56Z")

</div>

Hi,

is there any way to ship around the limitation that only a single  
`sub_filter` directive is supported per location?

In fact I want/need to replace 3 “strings” (/fileadmin/, /typo3conf/  
and /typo3temp/) within my root-location and “move” the requests over  
to absolute servernames (like a cdn) by the time the response is  
running through my frontend lb.

Any ideas how to accomplish that?

Regards,  
Christian

---

<div class="post-metadata">

**Author:** ![SSChristian\_BSSnnin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/6f9a4e/32.png) [@SSChristian\_BSSnnin](https://www.ruby-forum.com/u/SSChristian_BSSnnin)\
**Post date:** [August 9, 2012, 7:03am UTC](https://www.ruby-forum.com/t/multiple-replacements-with-http-sub-module/221995/2 "2012-08-09T07:03:51Z")

</div>

Try my substitutions module:

> **[GitHub - yaoweibin/ngx\_http\_substitutions\_filter\_module: a filter module...](https://github.com/yaoweibin/ngx_http_substitutions_filter_module)**
>
> a filter module which can do both regular expression and fixed string substitutions for nginx - GitHub - yaoweibin/ngx\_http\_substitutions\_filter\_module: a filter module which can do both regular ex...

2012/8/8 Christian B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
